summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-10-13 00:18:58 +0000
committerCraig Topper <craig.topper@intel.com>2017-10-13 00:18:58 +0000
commitd6630b9889ba60e6f8035b4c02971cf7a831e573 (patch)
treefb9ae297f4d2e2acd3199402914665376ed2bb68
parent8bc23ab6582744206ab37b3723a1fc9ff96abf0c (diff)
downloadbcm5719-llvm-d6630b9889ba60e6f8035b4c02971cf7a831e573.tar.gz
bcm5719-llvm-d6630b9889ba60e6f8035b4c02971cf7a831e573.zip
[SelectionDAG] Correct the early out in SelectionDAG::getZeroExtendInReg to work properly for vector types.
I don't know if we ever hit this case or not. Turning it into an assert only fired on expanding some atomic operation in a SystemZ lit test. llvm-svn: 315648
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 744f5c5be2a..0d999984cdb 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1027,7 +1027,7 @@ SDValue SelectionDAG::getZeroExtendInReg(SDValue Op, const SDLoc &DL, EVT VT) {
assert(!VT.isVector() &&
"getZeroExtendInReg should use the vector element type instead of "
"the vector type!");
- if (Op.getValueType() == VT) return Op;
+ if (Op.getValueType().getScalarType() == VT) return Op;
unsigned BitWidth = Op.getScalarValueSizeInBits();
APInt Imm = APInt::getLowBitsSet(BitWidth,
VT.getSizeInBits());
OpenPOWER on IntegriCloud