diff options
author | Chad Rosier <mcrosier@codeaurora.org> | 2014-09-17 16:35:09 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@codeaurora.org> | 2014-09-17 16:35:09 +0000 |
commit | 307b50b0f66941a5bbdb7761db57d3572124f783 (patch) | |
tree | 5e4c4bdd9fb77fd09dcd2eeb85aa86a2bf33c8dd /llvm/lib/Transforms | |
parent | 353f358d241330971b9f67f7d02d4b1f59c72951 (diff) | |
download | bcm5719-llvm-307b50b0f66941a5bbdb7761db57d3572124f783.tar.gz bcm5719-llvm-307b50b0f66941a5bbdb7761db57d3572124f783.zip |
[IndVarSimplify] Partially revert r217953 to see if this fixes the bots.
Specifically, disable widening of unsigned compare instructions.
llvm-svn: 217962
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index 532666ea7c1..7cc34e1ad86 100644 --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -936,6 +936,10 @@ bool WidenIV::WidenLoopCompare(NarrowIVDefUse DU) { if (!Cmp) return false; + bool IsSigned = CmpInst::isSigned(Cmp->getPredicate()); + if (!IsSigned) + return false; + Value *Op = Cmp->getOperand(Cmp->getOperand(0) == DU.NarrowDef ? 1 : 0); unsigned CastWidth = SE->getTypeSizeInBits(Op->getType()); unsigned IVWidth = SE->getTypeSizeInBits(WideType); @@ -947,7 +951,6 @@ bool WidenIV::WidenLoopCompare(NarrowIVDefUse DU) { // Widen the other operand of the compare, if necessary. if (CastWidth < IVWidth) { - bool IsSigned = CmpInst::isSigned(Cmp->getPredicate()); Value *ExtOp = getExtend(Op, WideType, IsSigned, Cmp); DU.NarrowUse->replaceUsesOfWith(Op, ExtOp); } |