mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: Treat -1 as signed when using it to construct an "all bits set" llvm::APInt
This should enable us to revert
73c70ee338.
This commit is contained in:
@@ -2976,7 +2976,8 @@ static SILValue testAllControlVariableBits(SILLocation Loc,
|
||||
if (IVType->getFixedWidth() == 1)
|
||||
return CondVal;
|
||||
|
||||
SILValue AllBitsSet = B.createIntegerLiteral(Loc, CondVal->getType(), -1);
|
||||
SILValue AllBitsSet = B.createIntegerLiteral(Loc, CondVal->getType(), -1,
|
||||
/*treatAsSigned=*/true);
|
||||
if (!CmpEqFn.get())
|
||||
CmpEqFn = getBinaryFunction("cmp_eq", CondVal->getType(),
|
||||
B.getASTContext());
|
||||
|
||||
Reference in New Issue
Block a user