Home | History | Annotate | Download | only in InstCombine
      1 ; RUN: opt < %s -instcombine -S -o - | FileCheck %s
      2 
      3 ; CHECK: @a
      4 define i32 @a(<4 x i64> %I) {
      5 entry:
      6 ; CHECK-NOT: trunc <4 x i64>
      7         %J = trunc <4 x i64> %I to <4 x i32>
      8         %K = extractelement <4 x i32> %J, i32 3
      9 ; CHECK: extractelement <4 x i64>
     10 ; CHECK: trunc i64
     11 ; CHECK: ret
     12         ret i32 %K
     13 }
     14 
     15 
     16 ; CHECK: @b
     17 define i32 @b(<4 x float> %I) {
     18 entry:
     19 ; CHECK-NOT: fptosi <4 x float>
     20         %J = fptosi <4 x float> %I to <4 x i32>
     21         %K = extractelement <4 x i32> %J, i32 3
     22 ; CHECK: extractelement <4 x float>
     23 ; CHECK: fptosi float
     24 ; CHECK: ret
     25         ret i32 %K
     26 }
     27 
     28