Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -mtriple=x86_64-pc-linux -mcpu=corei7 | FileCheck %s
      2 ; RUN: llc < %s -mtriple=x86_64-pc-linux -mcpu=core-avx-i | FileCheck %s --check-prefix=AVX
      3 
      4 define <2 x double> @v2f2d_ext_vec(<2 x float> %v1) nounwind {
      5 entry:
      6 ; CHECK: v2f2d_ext_vec
      7 ; CHECK: cvtps2pd
      8 ; AVX:   v2f2d_ext_vec
      9 ; AVX:   vcvtps2pd
     10   %f1 = fpext <2 x float> %v1 to <2 x double>
     11   ret <2 x double> %f1
     12 }
     13 
     14 define <3 x double> @v3f2d_ext_vec(<3 x float> %v1) nounwind {
     15 entry:
     16 ; CHECK: v3f2d_ext_vec
     17 ; CHECK: cvtps2pd
     18 ; CHECK: shufpd
     19 ; CHECK: cvtps2pd
     20 ; AVX:   v3f2d_ext_vec
     21 ; AVX:   vcvtps2pd
     22 ; AVX:   ret
     23   %f1 = fpext <3 x float> %v1 to <3 x double>
     24   ret <3 x double> %f1
     25 }
     26 
     27 define <4 x double> @v4f2d_ext_vec(<4 x float> %v1) nounwind {
     28 entry:
     29 ; CHECK: v4f2d_ext_vec
     30 ; CHECK: cvtps2pd
     31 ; CHECK: shufpd
     32 ; CHECK: cvtps2pd
     33 ; AVX:   v4f2d_ext_vec
     34 ; AVX:   vcvtps2pd
     35 ; AVX:   ret
     36   %f1 = fpext <4 x float> %v1 to <4 x double>
     37   ret <4 x double> %f1
     38 }
     39 
     40 define <8 x double> @v8f2d_ext_vec(<8 x float> %v1) nounwind {
     41 entry:
     42 ; CHECK: v8f2d_ext_vec
     43 ; CHECK: cvtps2pd
     44 ; CHECK: cvtps2pd
     45 ; CHECK: shufpd
     46 ; CHECK: cvtps2pd
     47 ; CHECK: shufpd
     48 ; CHECK: cvtps2pd
     49 ; AVX:   v8f2d_ext_vec
     50 ; AVX:   vcvtps2pd
     51 ; AVX:   vextractf128
     52 ; AVX:   vcvtps2pd
     53 ; AVX:   ret
     54   %f1 = fpext <8 x float> %v1 to <8 x double>
     55   ret <8 x double> %f1
     56 }
     57 
     58 define void @test_vector_creation() nounwind {
     59   %1 = insertelement <4 x double> undef, double 0.000000e+00, i32 2
     60   %2 = load double, double addrspace(1)* null
     61   %3 = insertelement <4 x double> %1, double %2, i32 3
     62   store <4 x double> %3, <4 x double>* undef
     63   ret void
     64 }
     65