summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2011-12-08 13:10:01 +0000
committerNadav Rotem <nadav.rotem@intel.com>2011-12-08 13:10:01 +0000
commit26edb291ace843dba8ee775ae81ffb74bb129fce (patch)
treec48de565596949a32183d7cf6de66d42a4cd3f59 /llvm/lib/CodeGen/SelectionDAG
parentb6033396fd935dd053639d5e31c49b7f2f58c2ef (diff)
downloadbcm5719-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.cpp2
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;
OpenPOWER on IntegriCloud