[PATCH] D45317: Canonicalization of the min/max patterns.

Artur Gainullin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 5 05:54:40 PDT 2018


ArturGainullin created this revision.
ArturGainullin added a reviewer: spatel.

Implemented canonicalization of the following min/max patterns:

  %1 = xor i32 %x, -1
  %2 = icmp sgt[slt/ugt/ult] i32 %1, C1
  %3 = select i1 %2, i32 %1, i32 C1
  %res = xor i32 %3, -1

https://rise4fun.com/Alive/8jH


Repository:
  rL LLVM

https://reviews.llvm.org/D45317

Files:
  lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  test/Transforms/InstCombine/xor.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45317.141138.patch
Type: text/x-patch
Size: 4196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180405/f05fa68b/attachment.bin>


More information about the llvm-commits mailing list