Skip to content

Commit 778a0ae

Browse files
committed
[LoopIdiom] Address review
1 parent 2964bcf commit 778a0ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ bool LoopIdiomRecognize::runOnCountableLoop() {
341341

342342
// If this loop executes exactly one time, then it should be peeled, not
343343
// optimized by this pass.
344-
if (match(BECount, m_scev_SpecificInt(0)))
344+
if (BECount->isZero())
345345
return false;
346346

347347
SmallVector<BasicBlock *, 8> ExitBlocks;
@@ -3268,7 +3268,7 @@ bool LoopIdiomRecognize::recognizeShiftUntilZero() {
32683268
// Ok, transform appears worthwhile.
32693269
MadeChange = true;
32703270

3271-
bool OffsetIsZero = match(ExtraOffsetExpr, m_scev_SpecificInt(0));
3271+
bool OffsetIsZero = ExtraOffsetExpr->isZero();
32723272

32733273
// Step 1: Compute the loop's final IV value / trip count.
32743274

0 commit comments

Comments
 (0)