[llvm] [DAG] Support saturated truncate (PR #99418)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 26 09:40:44 PDT 2024
================
@@ -14930,6 +15088,11 @@ SDValue DAGCombiner::visitTRUNCATE(SDNode *N) {
if (N0.getOpcode() == ISD::TRUNCATE)
return DAG.getNode(ISD::TRUNCATE, DL, VT, N0.getOperand(0));
+ // fold satruated truncate
+ if (SDValue SaturatedTR = foldToSaturated(N, VT, N0, SrcVT, DL, TLI, DAG)) {
+ return SaturatedTR;
+ }
----------------
topperc wrote:
Drop curly braces
https://github.com/llvm/llvm-project/pull/99418
More information about the llvm-commits
mailing list