Skip to content

Commit cd74545

Browse files
author
Joe Shajrawi
authored
Merge pull request #5555 from shajrawi/constant_propagation_int_ctlz_syling
[SILOptimizer] ctlz support in constant propagation - code style fix
2 parents 4d05096 + 003a447 commit cd74545

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/SILOptimizer/Mandatory/ConstantPropagation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ static SILInstruction *constantFoldIntrinsic(BuiltinInst *BI,
190190
APInt LHSI = LHS->getValue();
191191
unsigned LZ = 0;
192192
// Check corner-case of source == zero
193-
if (LHSI.getLimitedValue() == 0) {
193+
if (LHSI == 0) {
194194
auto *RHS = dyn_cast<IntegerLiteralInst>(Args[1]);
195-
if (!RHS || RHS->getValue().getBoolValue() != 0) {
195+
if (!RHS || RHS->getValue() != 0) {
196196
// Undefined
197197
return nullptr;
198198
}

0 commit comments

Comments
 (0)