From 418481460ccfbbb5000fdc9fe8fa5093c1e178b6 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 17 Jul 2013 06:58:23 +0000 Subject: [PATCH] Teach x86 fast-isel to use AVX opcodes for vector stores when AVX is enabled. llvm-svn: 186496 --- lib/Target/X86/X86FastISel.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp index 7419822b673..8c9575c8b77 100644 --- a/lib/Target/X86/X86FastISel.cpp +++ b/lib/Target/X86/X86FastISel.cpp @@ -264,24 +264,24 @@ X86FastISel::X86FastEmitStore(EVT VT, unsigned ValReg, break; case MVT::v4f32: if (Aligned) - Opc = X86::MOVAPSmr; + Opc = Subtarget->hasAVX() ? X86::VMOVAPSmr : X86::MOVAPSmr; else - Opc = X86::MOVUPSmr; + Opc = Subtarget->hasAVX() ? X86::VMOVUPSmr : X86::MOVUPSmr; break; case MVT::v2f64: if (Aligned) - Opc = X86::MOVAPSmr; + Opc = Subtarget->hasAVX() ? X86::VMOVAPSmr : X86::MOVAPSmr; else - Opc = X86::MOVUPSmr; + Opc = Subtarget->hasAVX() ? X86::VMOVUPSmr : X86::MOVUPSmr; break; case MVT::v4i32: case MVT::v2i64: case MVT::v8i16: case MVT::v16i8: if (Aligned) - Opc = X86::MOVDQAmr; + Opc = Subtarget->hasAVX() ? X86::VMOVDQAmr : X86::MOVDQAmr; else - Opc = X86::MOVDQUmr; + Opc = Subtarget->hasAVX() ? X86::VMOVDQUmr : X86::MOVDQUmr; break; }