From dfa62f8d5642d5b84f2abe37e0c004c5ad119267 Mon Sep 17 00:00:00 2001 From: Sergei Barannikov Date: Sun, 24 Nov 2024 03:11:42 +0300 Subject: [PATCH] [Mips] Fix result type of MAdd/MSub nodes They have one "untyped" result in MipsInstrInfo.td, and this type is used in DAG patterns. --- llvm/lib/Target/Mips/MipsISelLowering.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp index d90348153fd3e..be7fb5bf05d02 100644 --- a/llvm/lib/Target/Mips/MipsISelLowering.cpp +++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp @@ -1102,8 +1102,7 @@ static SDValue performMADD_MSUBCombine(SDNode *ROOTNode, SelectionDAG &CurDAG, SDValue MAddOps[3] = { CurDAG.getNode(ISD::TRUNCATE, DL, MVT::i32, Mult->getOperand(0)), CurDAG.getNode(ISD::TRUNCATE, DL, MVT::i32, Mult->getOperand(1)), ACCIn}; - EVT VTs[2] = {MVT::i32, MVT::i32}; - SDValue MAdd = CurDAG.getNode(Opcode, DL, VTs, MAddOps); + SDValue MAdd = CurDAG.getNode(Opcode, DL, MVT::Untyped, MAddOps); SDValue ResLo = CurDAG.getNode(MipsISD::MFLO, DL, MVT::i32, MAdd); SDValue ResHi = CurDAG.getNode(MipsISD::MFHI, DL, MVT::i32, MAdd);