summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/vec_fpext.ll
diff options
context:
space:
mode:
authorMichael Liao <michael.liao@intel.com>2012-09-10 18:33:51 +0000
committerMichael Liao <michael.liao@intel.com>2012-09-10 18:33:51 +0000
commitb8150d852399f61f3fe7f6fd66edb99173de884c (patch)
treeb37dc287ac506a034a47a31abce73af66f49e946 /test/CodeGen/X86/vec_fpext.ll
parent7ae51be2a3a56be5cf0ee4557aa13a069c96a241 (diff)
downloadllvm-b8150d852399f61f3fe7f6fd66edb99173de884c.tar.gz
llvm-b8150d852399f61f3fe7f6fd66edb99173de884c.tar.bz2
llvm-b8150d852399f61f3fe7f6fd66edb99173de884c.tar.xz
Enhance PR11334 fix to support extload from v2f32/v4f32
- Fix an remaining issue of PR11674 as well git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163528 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/vec_fpext.ll')
-rw-r--r--test/CodeGen/X86/vec_fpext.ll32
1 files changed, 28 insertions, 4 deletions
diff --git a/test/CodeGen/X86/vec_fpext.ll b/test/CodeGen/X86/vec_fpext.ll
index 05b263e2e0..dc0464ff9e 100644
--- a/test/CodeGen/X86/vec_fpext.ll
+++ b/test/CodeGen/X86/vec_fpext.ll
@@ -1,14 +1,38 @@
; RUN: llc < %s -march=x86 -mattr=+sse41,-avx | FileCheck %s
+; RUN: llc < %s -march=x86 -mattr=+avx | FileCheck --check-prefix=AVX %s
; PR11674
define void @fpext_frommem(<2 x float>* %in, <2 x double>* %out) {
entry:
-; TODO: We should be able to generate cvtps2pd for the load.
-; For now, just check that we generate something sane.
-; CHECK: cvtss2sd
-; CHECK: cvtss2sd
+; CHECK: cvtps2pd (%{{.+}}), %xmm{{[0-9]+}}
+; AVX: vcvtps2pd (%{{.+}}), %xmm{{[0-9]+}}
%0 = load <2 x float>* %in, align 8
%1 = fpext <2 x float> %0 to <2 x double>
store <2 x double> %1, <2 x double>* %out, align 1
ret void
}
+
+define void @fpext_frommem4(<4 x float>* %in, <4 x double>* %out) {
+entry:
+; CHECK: cvtps2pd (%{{.+}}), %xmm{{[0-9]+}}
+; CHECK: cvtps2pd 8(%{{.+}}), %xmm{{[0-9]+}}
+; AVX: vcvtps2pd (%{{.+}}), %ymm{{[0-9]+}}
+ %0 = load <4 x float>* %in
+ %1 = fpext <4 x float> %0 to <4 x double>
+ store <4 x double> %1, <4 x double>* %out, align 1
+ ret void
+}
+
+define void @fpext_frommem8(<8 x float>* %in, <8 x double>* %out) {
+entry:
+; CHECK: cvtps2pd (%{{.+}}), %xmm{{[0-9]+}}
+; CHECK: cvtps2pd 8(%{{.+}}), %xmm{{[0-9]+}}
+; CHECK: cvtps2pd 16(%{{.+}}), %xmm{{[0-9]+}}
+; CHECK: cvtps2pd 24(%{{.+}}), %xmm{{[0-9]+}}
+; AVX: vcvtps2pd (%{{.+}}), %ymm{{[0-9]+}}
+; AVX: vcvtps2pd 16(%{{.+}}), %ymm{{[0-9]+}}
+ %0 = load <8 x float>* %in
+ %1 = fpext <8 x float> %0 to <8 x double>
+ store <8 x double> %1, <8 x double>* %out, align 1
+ ret void
+}