[PATCH] D149510: [ValueTracking] add UGT/UGE and lshr case in imply icmp
Zhu Siyuan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 3 04:27:49 PDT 2023
floatshadow added a comment.
In D149510#4315073 <https://reviews.llvm.org/D149510#4315073>, @nikic wrote:
> The extension to isImpliedCondOperands seems pretty reasonable to me. However, I think we should also handle the sgt/sge case at the same time, otherwise we're still going to leave this incomplete. We can test this part using variations of the existing patterns in the test, e.g. https://alive2.llvm.org/ce/z/Z8idUd.
>
> The new check in isTruePredicate I'm somewhat skeptical about. It adds support for one special case, but there are many other cases where we could determine that the predicate is true. This is essentially what the purpose of simplifyICmpInst is, and which presumably would already handle this pattern. However, there are likely compile-time concerns with just calling into InstSimplify here.
I'd like to split the patch into smaller pieces, and this revision for isImpliedCondOperands only.
Yes, I found that contraint elimination pass and icmp imply called by simplifyICmpInst have handle the simple case. But the former failed on the eq checks (issue 61393) and the latter only checks X + C like pattern (issue 62441)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149510/new/
https://reviews.llvm.org/D149510
More information about the llvm-commits
mailing list