[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
Wed Jan 18 08:58:09 PST 2017


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

Patch updated:
Add asserts for eq/ne compares (both for the existing NUW path and the NSW path that's being added here) to make it clear what the pre-conditions for these folds are.


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.84846.patch
Type: text/x-patch
Size: 11934 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170118/fe67cbe5/attachment.bin>


More information about the llvm-commits mailing list