[PATCH] D145073: [InstCombine] fold signed absolute diff patterns

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 2 07:48:00 PST 2023


spatel updated this revision to Diff 501869.
spatel added a comment.

Patch updated:

1. Match any pair of no-wrap subtracts.
2. But only propagate "nsw" with restrictions.

I added tests to try to make sure we are covering all of the variations and confirmed those and several others with Alive2.


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

https://reviews.llvm.org/D145073

Files:
  llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  llvm/test/Transforms/InstCombine/abs-1.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145073.501869.patch
Type: text/x-patch
Size: 10932 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230302/bd4ebfe7/attachment.bin>


More information about the llvm-commits mailing list