[llvm] [ConstraintElim] Support arbitrary incoming values for inductions (PR #68032)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 03:11:58 PDT 2023
fhahn wrote:
> This looks fine to me, but I do wonder whether
>
> > This is done after the existing check, which can help to catch cases where the expression gets simplified by SCEV to either an IR constant or existing value which can be used instead.
>
> really makes sense, especially the SCEVUnknown bit. Are there any tests that show a behavior difference if the check is dropped?
Ah yes, I forgot to drop the SCEVUnknown case. For the constant case, there's the admittedly slightly artificialg https://github.com/llvm/llvm-project/blob/main/llvm/test/Transforms/ConstraintElimination/monotonic-int-phis-wrapping.ll#L106
Updated the code to drop the SCEVUnknown case, sorry for the force push (I am just so used to rebasing....)
https://github.com/llvm/llvm-project/pull/68032
More information about the llvm-commits
mailing list