summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-05-16 17:19:05 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-05-16 17:19:05 +0000
commit9ac3631fa34cf2180ba6c3ce047b85b8cd41d48c (patch)
tree8cf981dc2b6a5481238434b0aabbba9cc54eeade /llvm/lib
parenta9a0c1570dcf5e0ff881a8a4eedfc38d350e88ae (diff)
downloadbcm5719-llvm-9ac3631fa34cf2180ba6c3ce047b85b8cd41d48c.tar.gz
bcm5719-llvm-9ac3631fa34cf2180ba6c3ce047b85b8cd41d48c.zip
If the result of a BIT_CONVERT is a v1* vector, it doesn't mean its source is a v1* vector.
llvm-svn: 51192
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 155b1a33acc..3290311df2b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -7109,10 +7109,13 @@ SDOperand SelectionDAGLegalize::ScalarizeVectorOp(SDOperand Op) {
Result = Node->getOperand(0);
assert(Result.getValueType() == NewVT);
break;
- case ISD::BIT_CONVERT:
- Result = DAG.getNode(ISD::BIT_CONVERT, NewVT,
- ScalarizeVectorOp(Op.getOperand(0)));
+ case ISD::BIT_CONVERT: {
+ SDOperand Op0 = Op.getOperand(0);
+ if (MVT::getVectorNumElements(Op0.getValueType()) == 1)
+ Op0 = ScalarizeVectorOp(Op0);
+ Result = DAG.getNode(ISD::BIT_CONVERT, NewVT, Op0);
break;
+ }
case ISD::SELECT:
Result = DAG.getNode(ISD::SELECT, NewVT, Op.getOperand(0),
ScalarizeVectorOp(Op.getOperand(1)),
OpenPOWER on IntegriCloud