1 ; RUN: llc < %s -march=x86 -mattr=+sse4.1,-avx | FileCheck %s 2 ; RUN: llc < %s -march=x86 -mcpu=corei7-avx | FileCheck --check-prefix=AVX %s 3 4 ; PR11674 5 define void @fpext_frommem(<2 x float>* %in, <2 x double>* %out) { 6 ; CHECK-LABEL: fpext_frommem: 7 ; AVX-LABEL: fpext_frommem: 8 entry: 9 ; CHECK: cvtps2pd (%{{.+}}), %xmm{{[0-9]+}} 10 ; AVX: vcvtps2pd (%{{.+}}), %xmm{{[0-9]+}} 11 %0 = load <2 x float>, <2 x float>* %in, align 8 12 %1 = fpext <2 x float> %0 to <2 x double> 13 store <2 x double> %1, <2 x double>* %out, align 1 14 ret void 15 } 16 17 define void @fpext_frommem4(<4 x float>* %in, <4 x double>* %out) { 18 ; CHECK-LABEL: fpext_frommem4: 19 ; AVX-LABEL: fpext_frommem4: 20 entry: 21 ; CHECK: cvtps2pd (%{{.+}}), %xmm{{[0-9]+}} 22 ; CHECK: cvtps2pd 8(%{{.+}}), %xmm{{[0-9]+}} 23 ; AVX: vcvtps2pd (%{{.+}}), %ymm{{[0-9]+}} 24 %0 = load <4 x float>, <4 x float>* %in 25 %1 = fpext <4 x float> %0 to <4 x double> 26 store <4 x double> %1, <4 x double>* %out, align 1 27 ret void 28 } 29 30 define void @fpext_frommem8(<8 x float>* %in, <8 x double>* %out) { 31 ; CHECK-LABEL: fpext_frommem8: 32 ; AVX-LABEL: fpext_frommem8: 33 entry: 34 ; CHECK: cvtps2pd (%{{.+}}), %xmm{{[0-9]+}} 35 ; CHECK: cvtps2pd 8(%{{.+}}), %xmm{{[0-9]+}} 36 ; CHECK: cvtps2pd 16(%{{.+}}), %xmm{{[0-9]+}} 37 ; CHECK: cvtps2pd 24(%{{.+}}), %xmm{{[0-9]+}} 38 ; AVX: vcvtps2pd 16(%{{.+}}), %ymm{{[0-9]+}} 39 ; AVX: vcvtps2pd (%{{.+}}), %ymm{{[0-9]+}} 40 %0 = load <8 x float>, <8 x float>* %in 41 %1 = fpext <8 x float> %0 to <8 x double> 42 store <8 x double> %1, <8 x double>* %out, align 1 43 ret void 44 } 45 46 define <2 x double> @fpext_fromconst() { 47 ; CHECK-LABEL: fpext_fromconst: 48 ; AVX-LABEL: fpext_fromconst: 49 entry: 50 ; CHECK: movaps {{.*#+}} xmm0 = [1.000000e+00,-2.000000e+00] 51 ; AVX: vmovaps {{.*#+}} xmm0 = [1.000000e+00,-2.000000e+00] 52 %0 = insertelement <2 x float> undef, float 1.0, i32 0 53 %1 = insertelement <2 x float> %0, float -2.0, i32 1 54 %2 = fpext <2 x float> %1 to <2 x double> 55 ret <2 x double> %2 56 } 57