[PATCH] D45315: [X86] Improve unsigned saturation downconvert detection.

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


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

New unsigned saturation downconvert pattern detection was implemented in
X86 Codegen:

  (truncate (smin (smax (x, C1), C2)) to dest_type)
  where C1 >= 0 and C2 >= 0 and C2 is unsigned max of destination type.

In this case smin is actually umin and this expression is unsigned
saturation of smax (x, C1) value with the following truncation.


Repository:
  rL LLVM

https://reviews.llvm.org/D45315

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/avx512-trunc.ll

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


More information about the llvm-commits mailing list