[PATCH] D36498: [InstCombine] Teach foldSelectICmpAnd to recognize a (icmp slt trunc X, 0) and (icmp sgt trunc X, -1) as equivalent to an and with the sign bit of the truncated type

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 16 13:27:27 PDT 2017


craig.topper updated this revision to Diff 111410.
craig.topper added a comment.

Rebasing this on top of https://reviews.llvm.org/D36781 which fixes the ashr transform for vectors.


https://reviews.llvm.org/D36498

Files:
  lib/Transforms/InstCombine/InstCombineSelect.cpp
  test/Transforms/InstCombine/select-with-bitwise-ops.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36498.111410.patch
Type: text/x-patch
Size: 9118 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170816/796e16f2/attachment.bin>


More information about the llvm-commits mailing list