• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 < %s | FileCheck %s
2; https://llvm.org/bugs/show_bug.cgi?id=28444
3
4; extract_vector_elt is allowed to have a different result type than
5; the vector scalar type.
6; This uses both
7;  i8 = extract_vector_elt v1i1, Constant:i64<0>
8;  i1 = extract_vector_elt v1i1, Constant:i64<0>
9
10
11; CHECK-LABEL: {{^}}extractelt_mismatch_vector_element_type:
12; CHECK: movb $1, %al
13; CHECK: movb %al
14; CHECK: movb %al
15define void @extractelt_mismatch_vector_element_type(i32 %arg) {
16bb:
17  %tmp = icmp ult i32 %arg, 0
18  %tmp2 = insertelement <1 x i1> undef, i1 true, i32 0
19  %tmp3 = select i1 %tmp, <1 x i1> undef, <1 x i1> %tmp2
20  %tmp6 = extractelement <1 x i1> %tmp3, i32 0
21  br label %bb1
22
23bb1:
24  store volatile <1 x i1> %tmp3, <1 x i1>* undef
25  store volatile i1 %tmp6, i1* undef
26  ret void
27}
28