[llvm] r186566 - Fix copy and paste bug from r186491 to make v2f64 use MOVAPD/MOVUPD as it should.
Craig Topper
craig.topper at gmail.com
Thu Jul 18 00:16:44 PDT 2013
Author: ctopper
Date: Thu Jul 18 02:16:44 2013
New Revision: 186566
URL: http://llvm.org/viewvc/llvm-project?rev=186566&view=rev
Log:
Fix copy and paste bug from r186491 to make v2f64 use MOVAPD/MOVUPD as it should.
Modified:
llvm/trunk/lib/Target/X86/X86FastISel.cpp
llvm/trunk/test/CodeGen/X86/fast-isel-store.ll
Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=186566&r1=186565&r2=186566&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Thu Jul 18 02:16:44 2013
@@ -270,9 +270,9 @@ X86FastISel::X86FastEmitStore(EVT VT, un
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:
Modified: llvm/trunk/test/CodeGen/X86/fast-isel-store.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-store.ll?rev=186566&r1=186565&r2=186566&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fast-isel-store.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fast-isel-store.ll Thu Jul 18 02:16:44 2013
@@ -46,3 +46,19 @@ define <4 x float> @test_store_4xf32_ali
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
+}
More information about the llvm-commits
mailing list