[PATCH] D153563: Use LVI to eliminate instructions during VP
Simon Hirst via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 25 22:12:09 PDT 2023
sehirst added a comment.
> TBH the entire patch makes very little sense to me.
Thanks for the review. I think the main problem is that I was unaware of some key `ConstantRange` and `LVI` functionality, namely `icmp()` and `getPredicateAt()`, as you pointed out. Additionally, when I ported this patch from LLVM 15 to main I missed that some of the opportunities to remove instructions I was catching in this patch had already been caught. However, I ran my tests in this patch on main and found missed opportunities to remove `sdiv`, `ashr`, and `lshr` instructions.
I am re-working the patch to remove the duplication and follow the existing methods (e.g. the code to eliminate `udiv`'s in `expandUDivOrURem()` using `ConstantRange::icmp()`).
I'll update this revision in a day or 2, including a fix for the build failure.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153563/new/
https://reviews.llvm.org/D153563
More information about the llvm-commits
mailing list