mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
[IndVarSimplify] Partially revert r217953 to see if this fixes the bots.
Specifically, disable widening of unsigned compare instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217962 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user