[PATCH] D156657: [InstCombine] Fold icmp(constants[x]) when the range of x is given
Hongyu Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 1 07:01:23 PDT 2023
XChy updated this revision to Diff 546034.
XChy added a comment.
Complete basically correct fold.
TODOs:
- Multi-variable testcases, Bitwidth-changed testcases
- Comments
- Performance/optimization to improve. When index is `ax + by + .... + C`, the longest distance we can step by is `gcd(a,b,c,d, ....)`, not just one. Based on this we fold more precisely.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156657/new/
https://reviews.llvm.org/D156657
Files:
llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/load-cmp.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156657.546034.patch
Type: text/x-patch
Size: 26197 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230801/3a02dcb3/attachment.bin>
More information about the llvm-commits
mailing list