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