[PATCH] D52286: [Intrinsic] Signed Saturation Intirnsic

Leonard Chan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 2 14:26:25 PDT 2018


leonardchan added a comment.

In https://reviews.llvm.org/D52286#1249759, @craig.topper wrote:

> Adding @spatel. This feels like it could be implemented with a min+max sequence in IR using 2 icmps and 2 selects. We've already spent quite a lot of effort optimizing these common patterns in both IR and SelectionDAG with the SMAX/SMIN ISD opcodes.


This was one of the initial design choices @ebevhan and I discussed before with either expanding this intrinsic into IR or in the DAG. We could have a pass that expands this into IR, but wouldn't be legalizing the instruction the "normal" way of checking if the this intrinsic is legal in the DAG.


Repository:
  rL LLVM

https://reviews.llvm.org/D52286





More information about the llvm-commits mailing list