[llvm] [DAG] Support saturated truncate (PR #99418)
    Simon Pilgrim via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Aug 12 04:34:03 PDT 2024
    
    
  
================
@@ -1908,6 +1909,8 @@ SDValue DAGCombiner::visit(SDNode *N) {
   case ISD::ZERO_EXTEND_VECTOR_INREG:
   case ISD::ANY_EXTEND_VECTOR_INREG: return visitEXTEND_VECTOR_INREG(N);
   case ISD::TRUNCATE:           return visitTRUNCATE(N);
+  case ISD::TRUNCATE_SSAT_U:
+  case ISD::TRUNCATE_USAT_U:    return visitTRUNCATE_USAT(N);
----------------
RKSimon wrote:
Should this be called visitTRUNCATE_SAT_U? Or should we just have a visitTRUNCATE_SAT call and handle the unsigned cases inside it?
https://github.com/llvm/llvm-project/pull/99418
    
    
More information about the llvm-commits
mailing list