diff options
author | Nadav Rotem <nadav.rotem@intel.com> | 2011-12-08 13:10:01 +0000 |
---|---|---|
committer | Nadav Rotem <nadav.rotem@intel.com> | 2011-12-08 13:10:01 +0000 |
commit | 44bac7cd659090f15face5171e3c346983aeb521 (patch) | |
tree | 5e99d7ec6f06d3210a866aae8cdf8759368a13a1 /lib/CodeGen/SelectionDAG | |
parent | 72590c973837f7d56638feb511a79574391f0eac (diff) | |
download | external_llvm-44bac7cd659090f15face5171e3c346983aeb521.zip external_llvm-44bac7cd659090f15face5171e3c346983aeb521.tar.gz external_llvm-44bac7cd659090f15face5171e3c346983aeb521.tar.bz2 |
Fix a bug in the integer-promotion of bitcast operations on vector types.
We must not issue a bitcast operation for integer-promotion of vector types, because the
location of the values in the vector may be different.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp index fd24238..a48ee7e 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp @@ -216,7 +216,7 @@ SDValue DAGTypeLegalizer::PromoteIntRes_BITCAST(SDNode *N) { case TargetLowering::TypeLegal: break; case TargetLowering::TypePromoteInteger: - if (NOutVT.bitsEq(NInVT)) + if (NOutVT.bitsEq(NInVT) && !NOutVT.isVector() && !NInVT.isVector()) // The input promotes to the same size. Convert the promoted value. return DAG.getNode(ISD::BITCAST, dl, NOutVT, GetPromotedInteger(InOp)); break; |