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 | 26edb291ace843dba8ee775ae81ffb74bb129fce (patch) | |
tree | c48de565596949a32183d7cf6de66d42a4cd3f59 /llvm/lib/CodeGen/SelectionDAG | |
parent | b6033396fd935dd053639d5e31c49b7f2f58c2ef (diff) | |
download | bcm5719-llvm-26edb291ace843dba8ee775ae81ffb74bb129fce.tar.gz bcm5719-llvm-26edb291ace843dba8ee775ae81ffb74bb129fce.zip |
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.
llvm-svn: 146150
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp index fd24238a916..a48ee7efdc8 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp +++ b/llvm/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; |