This optimization follows the work from D125264
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Looks fine, but I think you need to rebase and adjust this line to check for WithOverflowInst instead: https://github.com/llvm/llvm-project/blob/286ae63e168b5e5249bf52e2f1610057d604bab4/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp#L665
Comment Actions
We check for WithOverflowInst before we call tryToSimplifyOverflowMath so I don't think it is needed there
Comment Actions
What I meant is, if this code is not adjusted the condition will not get queued up for simplification in the first place.