; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=icelake-server | FileCheck %s

@G = global <1 x i1> <i1 true>
@G.1 = global i1 false

define void @foo(i32 %x) {
; CHECK-LABEL: foo:
; CHECK:       # %bb.0:
; CHECK-NEXT:    movq G@GOTPCREL(%rip), %rax
; CHECK-NEXT:    kmovb (%rax), %k0
; CHECK-NEXT:    kmovd %k0, %eax
; CHECK-NEXT:    andb $1, %al
; CHECK-NEXT:    movq G.1@GOTPCREL(%rip), %rcx
; CHECK-NEXT:    movb %al, (%rcx)
; CHECK-NEXT:    retq
  %LGV = load <1 x i1>, ptr @G
  %E = extractelement <1 x i1> %LGV, i32 %x
  store i1 %E, ptr @G.1
  ret void
}
