[PATCH] D134048: [ConstraintElimination] Simplify usub(a,b) if a s>=b.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 23 14:46:35 PST 2022


nikic added a comment.

In D134048#3984917 <https://reviews.llvm.org/D134048#3984917>, @zjaffal wrote:

> In D134048#3981480 <https://reviews.llvm.org/D134048#3981480>, @nikic wrote:
>
>> 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
>
> We check for `WithOverflowInst` before we call `tryToSimplifyOverflowMath` so I don't think it is needed there

What I meant is, if this code is not adjusted the condition will not get queued up for simplification in the first place.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134048/new/

https://reviews.llvm.org/D134048



More information about the llvm-commits mailing list