[llvm] [SDAG] Turn umin into smin if the saturation pattern is broken (PR #88505)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 12 10:38:12 PDT 2024
================
@@ -5589,7 +5592,7 @@ SDValue DAGCombiner::visitIMINMAX(SDNode *N) {
case ISD::UMAX: AltOpcode = ISD::SMAX; break;
default: llvm_unreachable("Unknown MINMAX opcode");
}
- if (TLI.isOperationLegal(AltOpcode, VT))
+ if (IsSatBroken || TLI.isOperationLegal(AltOpcode, VT))
----------------
RKSimon wrote:
What will happen after legalization on targets which don't use the SAT pattern and ISD::SMIN isn't a legal operation?
https://github.com/llvm/llvm-project/pull/88505
More information about the llvm-commits
mailing list