[PATCH] D26091: [ValueTracking] recognize more variants of smin/smax

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 10:59:04 PDT 2016

spatel created this revision.
spatel added reviewers: sanjoy, efriedma, majnemer.
spatel added a subscriber: llvm-commits.
Herald added a subscriber: mcrosier.

Try harder to detect obfuscated min/max patterns: the initial pattern was added with https://reviews.llvm.org/D9352 / https://reviews.llvm.org/rL236202. There was a bug fix for PR27137 at https://reviews.llvm.org/rL264996, but I think we can do better by folding the corresponding smax pattern and commuted variants.

For the PR27137 test case, we could further transform that to a mask with the smeared sign bit (ashr/and/not), but I'm not sure if we want to do that in IR?



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26091.76216.patch
Type: text/x-patch
Size: 4479 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161028/45bd9984/attachment.bin>

More information about the llvm-commits mailing list