[llvm] [DAG] Support saturated truncate (PR #99418)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 17 22:22:43 PDT 2024


================
@@ -804,6 +804,9 @@ enum NodeType {
 
   /// TRUNCATE - Completely drop the high bits.
   TRUNCATE,
+  /// TRUNCATE_[SU]SAT - Truncate for saturated operand
+  TRUNCATE_SSAT,
----------------
topperc wrote:

Is TRUNCATE_SSAT signed input to signed result?
Is TRUNCATE_USAT unsigned input to unsigned result?

I ask because X86's packuswb instructon does signed input to unsigned result so its worth being clearing here.

https://github.com/llvm/llvm-project/pull/99418


More information about the llvm-commits mailing list