[PATCH] D152067: [ConstraintElimination] Handle equality predicates
Antonio Frighetto via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 5 04:03:38 PDT 2023
antoniofrighetto updated this revision to Diff 528368.
antoniofrighetto added a comment.
Added a few more tests, one we check `a == b` simplified to false, when `a + 1 == b` is assumed, the other in which no simplification can be done when assuming `a >= b && b >= c`. Testing the transitivity of equality has been extended to check if `a + 1 == c + 1` also holds (via a `select`, note the orthogonal missed optimization there).
Polished up a bit the code & encapsulate the logic for handling equality constraints into `isEqImplied`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152067/new/
https://reviews.llvm.org/D152067
Files:
llvm/include/llvm/Analysis/ConstraintSystem.h
llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
llvm/test/Transforms/ConstraintElimination/assumes.ll
llvm/test/Transforms/ConstraintElimination/constants-unsigned-predicates.ll
llvm/test/Transforms/ConstraintElimination/eq.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152067.528368.patch
Type: text/x-patch
Size: 12770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230605/20cd8b2f/attachment.bin>
More information about the llvm-commits
mailing list