From 55475d448b513595787dfac62f7a1c069268840e 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 --- llvm/lib/Target/X86/X86FastISel.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp index 7419822..8c9575c 100644 --- a/llvm/lib/Target/X86/X86FastISel.cpp +++ b/llvm/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; } -- 2.7.4