[PATCH] D75405: [LSR] OptimizeShadowIV: Constant can be negative
Stefanos Baziotis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 2 12:29:27 PST 2020
baziotis updated this revision to Diff 247706.
baziotis edited the summary of this revision.
baziotis added a comment.
- Added test for `add` with `-1` constant and changed X86 test
I could not somehow make tests for `sub`. `SCEV` could not deduce that we won't overflow. Also, in the test file that added the test, which
seems to be the one that tests the function I changed, there was no `sub` whatsoever.
Moreover, I could not get SCEV to work for `0` constant. I'll have to check that again.
Other than that, one irrelevant test had to be changed. Unfortunately, by removing the cast, the codegen is worse. Previously, the slow
instruction was well.. the cast, i.e. `cvtsi2sd` while now we have spills and reloads.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75405/new/
https://reviews.llvm.org/D75405
Files:
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
llvm/test/CodeGen/X86/negative-stride-fptosi-user.ll
llvm/test/Transforms/LoopStrengthReduce/X86/2008-08-14-ShadowIV.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75405.247706.patch
Type: text/x-patch
Size: 3605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200302/db944460/attachment.bin>
More information about the llvm-commits
mailing list