[llvm] beea456 - [Mips] Fix result type of MAdd/MSub nodes (#117455)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 00:43:29 PST 2024


Author: Sergei Barannikov
Date: 2024-12-09T16:43:26+08:00
New Revision: beea45611839c61915f7fd26a0cc91b631c71f42

URL: https://github.com/llvm/llvm-project/commit/beea45611839c61915f7fd26a0cc91b631c71f42
DIFF: https://github.com/llvm/llvm-project/commit/beea45611839c61915f7fd26a0cc91b631c71f42.diff

LOG: [Mips] Fix result type of MAdd/MSub nodes (#117455)

They have one "untyped" result in `MipsInstrInfo.td`, and this type is
used in DAG patterns.

Added: 
    

Modified: 
    llvm/lib/Target/Mips/MipsISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp
index 036b59c57d5b05..d5f38c414e703d 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);


        


More information about the llvm-commits mailing list