[PATCH] D28406: [InstCombine] icmp sgt (shl nsw X, C1), C0 --> icmp sgt X, C0 >> C1

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 17 14:05:44 PST 2017


spatel updated this revision to Diff 84742.
spatel edited the summary of this revision.
spatel added a comment.

Patch updated:
Handle sgt, sle (slt), eq/ne in one patch to match the existing and related 'shl nuw' folds.
I added tests for sle with https://reviews.llvm.org/rL292248 and refactored with https://reviews.llvm.org/rL292260.


https://reviews.llvm.org/D28406

Files:
  lib/Transforms/InstCombine/InstCombineCompares.cpp
  test/Transforms/InstCombine/icmp-shl-nsw.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28406.84742.patch
Type: text/x-patch
Size: 10526 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170117/1d713692/attachment.bin>


More information about the llvm-commits mailing list