Skip to content

Commit b87110e

Browse files
committed
[SimplifyCFG] Avoid use of ConstantExpr::getIntegerCast() (NFC)
We're working on a ConstantInt here, so constant folding will always succeed. Just avoid using the ConstantExpr API.
1 parent bc41b0a commit b87110e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Utils/SimplifyCFG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ static ConstantInt *GetConstantInt(Value *V, const DataLayout &DL) {
502502
return CI;
503503
else
504504
return cast<ConstantInt>(
505-
ConstantExpr::getIntegerCast(CI, PtrTy, /*isSigned=*/false));
505+
ConstantFoldIntegerCast(CI, PtrTy, /*isSigned=*/false, DL));
506506
}
507507
return nullptr;
508508
}

0 commit comments

Comments
 (0)