================
@@ -1523,6 +1523,34 @@ static Instruction *foldBoxMultiply(BinaryOperator &I) {
return nullptr;
}
+/// Canonicalize a nested add/sub with a constant on the inner RHS by
+/// sinking the constant to the outer RHS.
+/// (X +/- C) +/- Y -> (X +/- Y) +/- C
----------------
dtcxzyw wrote:
The optional LoopInfo dependency was dropped in
https://github.com/llvm/llvm-project/commit/34b10e165d809bb133d37dfe934859800f21a100.
Not sure if InstCombine is the right place to perform the canonicalization. Is
it reverted by other loop passes? cc @fhahn
https://github.com/llvm/llvm-project/pull/191022
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits