[PATCH] D56355: [InstCombine] Simplify cttz/ctlz + icmp ugt/ult into mask check

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 5 08:13:25 PST 2019


nikic created this revision.
nikic added a reviewer: spatel.
Herald added a subscriber: llvm-commits.

Followup to D55745 <https://reviews.llvm.org/D55745>, this time handling comparisons with ugt and ult predicates (which are the canonical forms for non-equality predicates).

Based on the results, for ctlz we have the nice property that the mask check can always be represented as a ult/ugt comparison instead. I'm wondering if I should just emit it directly in that form and drop the single use check?


Repository:
  rL LLVM

https://reviews.llvm.org/D56355

Files:
  lib/Transforms/InstCombine/InstCombineCompares.cpp
  test/Transforms/InstCombine/cmp-intrinsic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56355.180370.patch
Type: text/x-patch
Size: 8862 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190105/74c02384/attachment.bin>


More information about the llvm-commits mailing list