summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-07-09 11:13:16 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-07-09 11:13:16 +0000
commit14cad41e144e333f5313bb95c948c1570559b2a9 (patch)
tree82cc0e4282bed31ef6e4549dc6742ead7692b6a8 /llvm/lib/CodeGen
parentd6f1733addc820d23560d3e06f358deb861ae94a (diff)
downloadbcm5719-llvm-14cad41e144e333f5313bb95c948c1570559b2a9.tar.gz
bcm5719-llvm-14cad41e144e333f5313bb95c948c1570559b2a9.zip
Sink two variables only used in an assert into the assert itself. Should
fix the release builds with Werror. llvm-svn: 212612
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
index dc61577d6a3..4af854ec0c9 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -2413,7 +2413,6 @@ bool DAGTypeLegalizer::WidenVectorOperand(SDNode *N, unsigned OpNo) {
SDValue DAGTypeLegalizer::WidenVecOp_ZERO_EXTEND(SDNode *N) {
SDLoc DL(N);
EVT VT = N->getValueType(0);
- unsigned NumElts = VT.getVectorNumElements();
SDValue InOp = N->getOperand(0);
// If some legalization strategy other than widening is used on the operand,
@@ -2422,8 +2421,9 @@ SDValue DAGTypeLegalizer::WidenVecOp_ZERO_EXTEND(SDNode *N) {
if (getTypeAction(InOp.getValueType()) != TargetLowering::TypeWidenVector)
return WidenVecOp_Convert(N);
InOp = GetWidenedVector(InOp);
- EVT InVT = InOp.getValueType();
- assert(NumElts < InVT.getVectorNumElements() && "Input wasn't widened!");
+ assert(VT.getVectorNumElements() <
+ InOp.getValueType().getVectorNumElements() &&
+ "Input wasn't widened!");
// Use a special DAG node to represent the operation of zero extending the
// low lanes.
OpenPOWER on IntegriCloud