[llvm] [InstCombine] Split div/rem by a select of constants with a variable dividend (PR #216908)
Adam Scott via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 23:20:00 PDT 2026
as4230 wrote:
> If I understand correctly, there are still some InstCombine passes after VectorCombine. If placed in VectorCombine, how to prevent InstCombine reverts this optimization?
Yes, we need that for the non pow2 cases. We get lucky on near pow2 because InstCombine rewrites the pow2 arm to lshr first, so the arms no longer share an opcode and foldSelectOpOp cannot match them. The InstCombine and DAG guards will be needed for those.
> That PR looks like will never be landed.
I feel that. I have a vectorcombine draft PR up for whenever it does land: https://github.com/llvm/llvm-project/pull/219379
https://github.com/llvm/llvm-project/pull/216908
More information about the llvm-commits
mailing list