summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2015-10-17 16:49:43 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2015-10-17 16:49:43 +0000
commit24057b95662c622f1f6ae8d4bf54fbce90c9ad02 (patch)
tree6283f15168a3c3efe878ce7205b0683421633f16 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent9ff9bf4959c288a0d8eb1cdf62c6cbd0db70af27 (diff)
downloadbcm5719-llvm-24057b95662c622f1f6ae8d4bf54fbce90c9ad02.tar.gz
bcm5719-llvm-24057b95662c622f1f6ae8d4bf54fbce90c9ad02.zip
[DAG] Ensure vector constant folding uses correct scalar undef types
Minor fix to D13665 found during post-commit review. llvm-svn: 250616
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 2ff20774eae..6d613436b8f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -3321,11 +3321,11 @@ SDValue SelectionDAG::FoldConstantVectorArithmetic(unsigned Opcode, SDLoc DL,
for (unsigned i = 0; i != NumElts; i++) {
SmallVector<SDValue, 4> ScalarOps;
for (SDValue Op : Ops) {
- EVT InSVT = Op->getValueType(0).getScalarType();
+ EVT InSVT = Op.getValueType().getScalarType();
BuildVectorSDNode *InBV = dyn_cast<BuildVectorSDNode>(Op);
if (!InBV) {
// We've checked that this is UNDEF above.
- ScalarOps.push_back(getUNDEF(LegalSVT));
+ ScalarOps.push_back(getUNDEF(InSVT));
continue;
}
OpenPOWER on IntegriCloud