[PATCH] D53340: [Intrinsic] Unigned Saturation Addition Intrinsic

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 17 01:56:34 PDT 2018


bjope added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:4685
   // SatMax -> Overflow && Sum < 0
   // SatMin -> Overflow && Sum > 0
   SDValue Zero = DAG.getConstant(0, dl, LHS.getValueType());
----------------
Sum >= 0

Also, these comments should probably be moved inside the if clause below (as they apply for SADDSAT).
For UADDSAT it is enough to check if we got overflow.


Repository:
  rL LLVM

https://reviews.llvm.org/D53340





More information about the llvm-commits mailing list