[PATCH] D43463: [SelectionDAG] ComputeKnownBits - add support for SMIN+SMAX clamp patterns

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 06:51:16 PST 2018


RKSimon created this revision.
RKSimon added reviewers: craig.topper, spatel, zvi.

If we have a clamp pattern, SMIN(SMAX(X, LO),HI) or SMAX(SMIN(X, HI),LO) then we can deduce that the number of signbits (zeros/ones) will be at least the minimum of the LO and HI constants.

ComputeKnownBits equivalent of https://reviews.llvm.org/D43338.


Repository:
  rL LLVM

https://reviews.llvm.org/D43463

Files:
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  test/CodeGen/X86/vector-trunc-packus.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43463.134905.patch
Type: text/x-patch
Size: 74671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180219/e8c7e5c0/attachment-0001.bin>


More information about the llvm-commits mailing list