[llvm] [DAG] Support saturated truncate (PR #99418)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 26 09:39:33 PDT 2024
================
@@ -14915,6 +14920,159 @@ SDValue DAGCombiner::visitEXTEND_VECTOR_INREG(SDNode *N) {
return SDValue();
}
+SDValue DAGCombiner::visitTRUNCATE_USAT(SDNode *N) {
+ EVT VT = N->getValueType(0);
+ SDValue N0 = N->getOperand(0);
+ SDValue FPInstr = N0.getOpcode() == ISD::SMAX ? N0.getOperand(0) : N0;
----------------
topperc wrote:
Do you need to check the other operand of this SMAX?
https://github.com/llvm/llvm-project/pull/99418
More information about the llvm-commits
mailing list