[PATCH] D124369: [InstCombine] C0 >>{ashr, exact} (X - C1) --> (C0 << C1) >>{ashr} X

Nicolas Abram via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 16:42:23 PDT 2022


nico-abram updated this revision to Diff 425335.
nico-abram added a comment.

Updated the diff with the 2 tests to ensure the opt is not applied on non-exact ashr/lshr `ashr_add_negative_shift_no_exact` and `lshr_add_negative_shift_no_exact`.

To be sure I understand correctly: You mean adding just the tests, and have the same kind of CHECK-NEXT FileCheck directives, but with the expected input IR i.e the same IR the tests contain, to verify the inputs are not being affected by unrelated optimizations? I'm attaching baseline.patch F22911457: baseline.patch <https://reviews.llvm.org/F22911457> with that changeset. If needed I can open a new revision for the baseline test cases, or just update the diff of this one. I ran the tests locally on the baseline and they passed.

I do not have commit access, so it would be great if you could push for me. Please use "Nicolas Abram Lujan abramlujan at gmail.com" if a name/email is needed.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124369/new/

https://reviews.llvm.org/D124369

Files:
  llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
  llvm/test/Transforms/InstCombine/shift-add.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124369.425335.patch
Type: text/x-patch
Size: 7647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220426/1d03585c/attachment.bin>


More information about the llvm-commits mailing list