[llvm] [DAG] Support saturated truncate (PR #99418)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 23 09:57:20 PDT 2024
================
@@ -16617,9 +16631,11 @@ static SDValue combineTruncToVnclip(SDNode *N, SelectionDAG &DAG,
SDValue Val;
unsigned ClipOpc;
- if ((Val = DetectUSatPattern(Src)))
+
+ Val = N->getOperand(0);
+ if (N->getOpcode() == RISCVISD::TRUNCATE_VECTOR_VL_USAT)
ClipOpc = RISCVISD::VNCLIPU_VL;
- else if ((Val = DetectSSatPattern(Src)))
+ else if (N->getOpcode() == RISCVISD::TRUNCATE_VECTOR_VL_SSAT)
----------------
topperc wrote:
Nevermind. It's not the same because VNCLIP has a shift amount.
https://github.com/llvm/llvm-project/pull/99418
More information about the llvm-commits
mailing list