[llvm] [Patchpoint] Implement integer result type legalization for patchpoints (PR #97278)

Csanád Hajdú via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 1 04:27:15 PDT 2024


================
@@ -5992,6 +5996,26 @@ SDValue DAGTypeLegalizer::PromoteIntRes_VP_REDUCE(SDNode *N) {
                      N->getOperand(1), N->getOperand(2), N->getOperand(3));
 }
 
+SDValue DAGTypeLegalizer::PromoteIntRes_PATCHPOINT(SDNode *N) {
+  EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), N->getValueType(0));
+  SDLoc dl(N);
+
+  assert(N->getNumValues() == 3 && "Expected 3 values for PATCHPOINT");
+  SmallVector<EVT, 3> VTs(N->values());
+  VTs[0] = NVT;
+  SDVTList VTList = DAG.getVTList(VTs);
----------------
Il-Capitano wrote:

Thank you, fixed it.

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


More information about the llvm-commits mailing list