summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-07-18 07:16:44 +0000
committerCraig Topper <craig.topper@gmail.com>2013-07-18 07:16:44 +0000
commitad1fff9be7d6e421299f9af025620eb5c97dfe0c (patch)
treef3cda2374b723a91b3c6137ffc9735a15b457287
parentf0546402af00d4e1c97a504967508e2d4288cbc8 (diff)
downloadbcm5719-llvm-ad1fff9be7d6e421299f9af025620eb5c97dfe0c.tar.gz
bcm5719-llvm-ad1fff9be7d6e421299f9af025620eb5c97dfe0c.zip
Fix copy and paste bug from r186491 to make v2f64 use MOVAPD/MOVUPD as it should.
llvm-svn: 186566
-rw-r--r--llvm/lib/Target/X86/X86FastISel.cpp4
-rw-r--r--llvm/test/CodeGen/X86/fast-isel-store.ll16
2 files changed, 18 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp
index 8c9575c8b77..5bc34201aa4 100644
--- a/llvm/lib/Target/X86/X86FastISel.cpp
+++ b/llvm/lib/Target/X86/X86FastISel.cpp
@@ -270,9 +270,9 @@ X86FastISel::X86FastEmitStore(EVT VT, unsigned ValReg,
break;
case MVT::v2f64:
if (Aligned)
- Opc = Subtarget->hasAVX() ? X86::VMOVAPSmr : X86::MOVAPSmr;
+ Opc = Subtarget->hasAVX() ? X86::VMOVAPDmr : X86::MOVAPDmr;
else
- Opc = Subtarget->hasAVX() ? X86::VMOVUPSmr : X86::MOVUPSmr;
+ Opc = Subtarget->hasAVX() ? X86::VMOVUPDmr : X86::MOVUPDmr;
break;
case MVT::v4i32:
case MVT::v2i64:
diff --git a/llvm/test/CodeGen/X86/fast-isel-store.ll b/llvm/test/CodeGen/X86/fast-isel-store.ll
index 06f5b6621a1..3d2a46c2bd1 100644
--- a/llvm/test/CodeGen/X86/fast-isel-store.ll
+++ b/llvm/test/CodeGen/X86/fast-isel-store.ll
@@ -46,3 +46,19 @@ define <4 x float> @test_store_4xf32_aligned(<4 x float>* nocapture %addr, <4 x
store <4 x float> %value, <4 x float>* %addr, align 16
ret <4 x float> %value
}
+
+define <2 x double> @test_store_2xf64(<2 x double>* nocapture %addr, <2 x double> %value, <2 x double> %value2) {
+; CHECK: movupd
+; CHECK: ret
+ %foo = fadd <2 x double> %value, %value2 ; to force dobule type on store
+ store <2 x double> %foo, <2 x double>* %addr, align 1
+ ret <2 x double> %foo
+}
+
+define <2 x double> @test_store_2xf64_aligned(<2 x double>* nocapture %addr, <2 x double> %value, <2 x double> %value2) {
+; CHECK: movapd
+; CHECK: ret
+ %foo = fadd <2 x double> %value, %value2 ; to force dobule type on store
+ store <2 x double> %foo, <2 x double>* %addr, align 16
+ ret <2 x double> %foo
+}
OpenPOWER on IntegriCloud