[PATCH] D96399: [X86][CodeGenPrepare] Try to reuse IV's incremented value instead of adding the offset
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 01:31:06 PST 2021
mkazantsev updated this revision to Diff 326626.
mkazantsev retitled this revision from "[X86][CodeGenPrepare] Try to reuse IV's incremented value instead of adding the offset (WIP)" to "[X86][CodeGenPrepare] Try to reuse IV's incremented value instead of adding the offset".
mkazantsev added a comment.
Added tests & safety checks against add/sub with `nuw/nsw` flags to avoid potential misuse of poisoned values. So far we conservatively restrain from optimizing such doubteous cases. Follow-up planned: try to prove flags is possible, if not - drop them (?).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96399/new/
https://reviews.llvm.org/D96399
Files:
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/test/CodeGen/X86/2020_12_02_decrementing_loop.ll
llvm/test/CodeGen/X86/overflowing-iv.ll
llvm/test/CodeGen/X86/uadd_inc_iv.ll
llvm/test/CodeGen/X86/usub_inc_iv.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96399.326626.patch
Type: text/x-patch
Size: 21256 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210226/9263bf04/attachment.bin>
More information about the llvm-commits
mailing list