diff options
author | Nadav Rotem <nadav.rotem@intel.com> | 2011-02-20 12:37:50 +0000 |
---|---|---|
committer | Nadav Rotem <nadav.rotem@intel.com> | 2011-02-20 12:37:50 +0000 |
commit | ed9b934f65d82324506f03e2db2834682c7a8914 (patch) | |
tree | f9eb5310a278d45abf817090ac930efe6f9c42f2 /lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | 1a4021a2be4a59e9f9010776cb6f72107241aeb5 (diff) | |
download | external_llvm-ed9b934f65d82324506f03e2db2834682c7a8914.zip external_llvm-ed9b934f65d82324506f03e2db2834682c7a8914.tar.gz external_llvm-ed9b934f65d82324506f03e2db2834682c7a8914.tar.bz2 |
Fix 9267; Add vector zext support.
The DAGCombiner folds the zext into complex load instructions. This patch
prevents this optimization on vectors since none of the supported targets
knows how to perform load+vector_zext in one instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126080 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 9035602..c5f0324 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -3887,7 +3887,9 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) { } // fold (zext (load x)) -> (zext (truncate (zextload x))) - if (ISD::isNON_EXTLoad(N0.getNode()) && + // None of the supported targets knows how to perform load and vector_zext + // in one instruction. We only perform this transformation on scalar zext. + if (ISD::isNON_EXTLoad(N0.getNode()) && !VT.isVector() && ((!LegalOperations && !cast<LoadSDNode>(N0)->isVolatile()) || TLI.isLoadExtLegal(ISD::ZEXTLOAD, N0.getValueType()))) { bool DoXform = true; |