[llvm-commits] [llvm] r51624 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Nate Begeman
natebegeman at mac.com
Tue May 27 17:24:25 PDT 2008
Author: sampo
Date: Tue May 27 19:24:25 2008
New Revision: 51624
URL: http://llvm.org/viewvc/llvm-project?rev=51624&view=rev
Log:
Don't attempt to create VZEXT_LOAD out of an extload. This an issue where the
code generator would do something like this:
f64 = load f32 <anyext>, f32mem
v2f64 = insertelt undef, %0, 0
v2f64 = insertelt %1, 0.0, 1
into
v2f64 = vzext_load f32mem
which on x86 is movsd, when you really wanted a cvtss2sd/movsd pair.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=51624&r1=51623&r2=51624&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue May 27 19:24:25 2008
@@ -6324,6 +6324,11 @@
// Transform it into VZEXT_LOAD addr.
LoadSDNode *LD = cast<LoadSDNode>(Base);
+
+ // Load must not be an extload.
+ if (LD->getExtensionType() != ISD::NON_EXTLOAD)
+ return SDOperand();
+
return DAG.getNode(X86ISD::VZEXT_LOAD, VT, LD->getChain(), LD->getBasePtr());
}
More information about the llvm-commits
mailing list