Skip to content

Commit fc986e3

Browse files
committed
[SCEV][NFC] Call getConstantMaxBackedgeTakenCount once in printout
1 parent 211d941 commit fc986e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Analysis/ScalarEvolution.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13368,9 +13368,9 @@ static void PrintLoopInfo(raw_ostream &OS, ScalarEvolution *SE,
1336813368
L->getHeader()->printAsOperand(OS, /*PrintType=*/false);
1336913369
OS << ": ";
1337013370

13371-
if (!isa<SCEVCouldNotCompute>(SE->getConstantMaxBackedgeTakenCount(L))) {
13372-
OS << "constant max backedge-taken count is "
13373-
<< *SE->getConstantMaxBackedgeTakenCount(L);
13371+
auto *ConstantBTC = SE->getConstantMaxBackedgeTakenCount(L);
13372+
if (!isa<SCEVCouldNotCompute>(ConstantBTC)) {
13373+
OS << "constant max backedge-taken count is " << *ConstantBTC;
1337413374
if (SE->isBackedgeTakenCountMaxOrZero(L))
1337513375
OS << ", actual taken count either this or zero.";
1337613376
} else {

0 commit comments

Comments
 (0)