Skip to content

Commit dfc3fc7

Browse files
committed
[LICM] Address comments
* Minor formatting change * Updated comment
1 parent 19da024 commit dfc3fc7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Transforms/Scalar/LICM.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2786,7 +2786,7 @@ static bool hoistMulAddAssociation(Instruction &I, Loop &L,
27862786
/// 1. "(LV op C1) op C2" ==> "LV op (C1 op C2)"
27872787
///
27882788
/// where op is an associative binary op, LV is a loop variant, and C1 and C2
2789-
/// are loop invariants.
2789+
/// are loop invariants that we want to hoist.
27902790
///
27912791
/// TODO: This can be extended to more cases such as
27922792
/// 2. "C1 op (C2 op LV)" ==> "(C1 op C2) op LV"
@@ -2818,8 +2818,8 @@ static bool hoistBOAssociation(Instruction &I, Loop &L,
28182818
IRBuilder<> Builder(Preheader->getTerminator());
28192819
Value *Inv = Builder.CreateBinOp(Opcode, C1, C2, "invariant.op");
28202820

2821-
auto *NewBO = BinaryOperator::Create(Opcode, LV, Inv,
2822-
BO->getName() + ".reass", BO);
2821+
auto *NewBO =
2822+
BinaryOperator::Create(Opcode, LV, Inv, BO->getName() + ".reass", BO);
28232823
NewBO->copyIRFlags(BO);
28242824
BO->replaceAllUsesWith(NewBO);
28252825
eraseInstruction(*BO, SafetyInfo, MSSAU);

0 commit comments

Comments
 (0)