[PATCH] D152646: [ValueTracking] More unsigned binary op implied conditions
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 12 03:01:08 PDT 2023
nikic added a comment.
In D152646#4412382 <https://reviews.llvm.org/D152646#4412382>, @caojoshua wrote:
> In D152646#4411887 <https://reviews.llvm.org/D152646#4411887>, @nikic wrote:
>
>> I predicted this is going to happen in https://reviews.llvm.org/D149510#4315073, and now it is happening. You are reimplementing InstSimplify comparison folding in isTruePredicate().
>
> I'm not aware of where in InstSimplify this is re-implementing. `simplifyICmp()` and `simplifyICmpOfBools()` both make calls out to `isTruePredicate()`. Passing in the test examples to places like InstCombine or ConstraintElimination does not simplify. I don't believe existing logic to simplify these cases exists right now.
I don't follow. isTruePredicate() is a static function in ValueTracking, so how can InstSimplify call it?
You should be able to find the cases you're duplicating in simplifyICmpWithBinOpOnLHS().
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152646/new/
https://reviews.llvm.org/D152646
More information about the llvm-commits
mailing list