[llvm] [ConstraintElim] Use cond from header as upper bound on IV in exit BB. (PR #94610)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 07:04:34 PDT 2024


v01dXYZ wrote:

* It seems to me only the loop with a predicate `EQ/NE` are supported. But the canonicalisation of the predicate for an AddRec happens in `IndVarSimplify` (`linearFunctionTestReplace`): https://github.com/llvm/llvm-project/blob/3b16630c26505060a876f578e4b2ba701c780e9a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp#L951
* I really don't want to sound like a smart*ss but I tested with clang but I didn't manage to get the snippet from the issue to be optimised (even by replacing the predicate from a `<=` to `!=`). I could have made a mistake though.

https://github.com/llvm/llvm-project/pull/94610


More information about the llvm-commits mailing list