Home | History | Annotate | Download | only in InstCombine
      1 ; RUN: opt < %s -instcombine -S | FileCheck %s
      2 
      3 define double @a(<1 x i64> %y) {
      4   %c = bitcast <1 x i64> %y to double
      5   ret double %c
      6  
      7 ; CHECK-LABEL: @a(
      8 ; CHECK-NEXT:  bitcast <1 x i64> %y to <1 x double>
      9 ; CHECK-NEXT:  extractelement <1 x double> {{.*}}, i32 0
     10 ; CHECK-NEXT:  ret double
     11 }
     12 
     13 define i64 @b(<1 x i64> %y) {
     14   %c = bitcast <1 x i64> %y to i64
     15   ret i64 %c
     16 
     17 ; CHECK-LABEL: @b(
     18 ; CHECK-NEXT:  extractelement <1 x i64> %y, i32 0
     19 ; CHECK-NEXT:  ret i64
     20 }
     21 
     22 define <1 x i64> @c(double %y) {
     23   %c = bitcast double %y to <1 x i64>
     24   ret <1 x i64> %c
     25 
     26 ; CHECK-LABEL: @c(
     27 ; CHECK-NEXT:  bitcast double %y to i64
     28 ; CHECK-NEXT:  insertelement <1 x i64> undef, i64 {{.*}}, i32 0
     29 ; CHECK-NEXT:  ret <1 x i64>
     30 }
     31 
     32 define <1 x i64> @d(i64 %y) {
     33   %c = bitcast i64 %y to <1 x i64>
     34   ret <1 x i64> %c
     35 
     36 ; CHECK-LABEL: @d(
     37 ; CHECK-NEXT:  insertelement <1 x i64> undef, i64 %y, i32 0
     38 ; CHECK-NEXT:  ret <1 x i64>
     39 }
     40 
     41 
     42