[llvm] [AMDGPU] selecting v_sat_pk instruction, version 2 (PR #123297)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 00:55:05 PST 2025


================
@@ -6613,6 +6638,43 @@ void SITargetLowering::ReplaceNodeResults(SDNode *N,
     Results.push_back(lowerFSQRTF16(SDValue(N, 0), DAG));
     break;
   }
+  case ISD::TRUNCATE_SSAT_U: {
+    SDLoc SL(N);
+    SDValue Src = N->getOperand(0);
+    EVT SrcVT = Src.getValueType();
+    EVT DstVT = N->getValueType(0);
+
+    assert(SrcVT.isVector() && DstVT.isVector());
----------------
arsenm wrote:

Also should assert the element type is i8 

https://github.com/llvm/llvm-project/pull/123297


More information about the llvm-commits mailing list