diff options
author | Nate Begeman <natebegeman@mac.com> | 2008-05-28 00:24:25 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2008-05-28 00:24:25 +0000 |
commit | f7333bf4a2c3d833a971b2dc3015aa5304fb4f0d (patch) | |
tree | 81ba28a8cbc85f2284d9aaa47face7ea817fe948 /lib | |
parent | ed185d6e967456ebb35acf5e7e2f9f80d3a8b11a (diff) | |
download | external_llvm-f7333bf4a2c3d833a971b2dc3015aa5304fb4f0d.zip external_llvm-f7333bf4a2c3d833a971b2dc3015aa5304fb4f0d.tar.gz external_llvm-f7333bf4a2c3d833a971b2dc3015aa5304fb4f0d.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51624 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 2a9cef1..5343971 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -6324,6 +6324,11 @@ static SDOperand PerformBuildVectorCombine(SDNode *N, SelectionDAG &DAG, // 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()); } |