[llvm] [Mips] Use a Target ISD opcode for PseudoD_SELECT (PR #84294)

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 01:44:41 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 886ecb3078e5f3a5cffc70408a637242c223c363 5468b0a8c47ec19177c8e11ddc6eee13f4cc3bfc -- llvm/lib/Target/Mips/MipsISelLowering.cpp llvm/lib/Target/Mips/MipsISelLowering.h llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp
index 7e5f148e7b..154536a948 100644
--- a/llvm/lib/Target/Mips/MipsISelLowering.cpp
+++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp
@@ -239,8 +239,10 @@ const char *MipsTargetLowering::getTargetNodeName(unsigned Opcode) const {
   case MipsISD::MAQ_S_W_PHR:       return "MipsISD::MAQ_S_W_PHR";
   case MipsISD::MAQ_SA_W_PHL:      return "MipsISD::MAQ_SA_W_PHL";
   case MipsISD::MAQ_SA_W_PHR:      return "MipsISD::MAQ_SA_W_PHR";
-  case MipsISD::DOUBLE_SELECT_I:   return "MipsISD::DOUBLE_SELECT_I";
-  case MipsISD::DOUBLE_SELECT_I64: return "MipsISD::DOUBLE_SELECT_I64";
+  case MipsISD::DOUBLE_SELECT_I:
+    return "MipsISD::DOUBLE_SELECT_I";
+  case MipsISD::DOUBLE_SELECT_I64:
+    return "MipsISD::DOUBLE_SELECT_I64";
   case MipsISD::DPAU_H_QBL:        return "MipsISD::DPAU_H_QBL";
   case MipsISD::DPAU_H_QBR:        return "MipsISD::DPAU_H_QBR";
   case MipsISD::DPSU_H_QBL:        return "MipsISD::DPSU_H_QBL";
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.h b/llvm/lib/Target/Mips/MipsISelLowering.h
index 84ad40d6bb..d78ce13f5e 100644
--- a/llvm/lib/Target/Mips/MipsISelLowering.h
+++ b/llvm/lib/Target/Mips/MipsISelLowering.h
@@ -52,210 +52,210 @@ class TargetRegisterClass;
 
   namespace MipsISD {
 
-    enum NodeType : unsigned {
-      // Start the numbering from where ISD NodeType finishes.
-      FIRST_NUMBER = ISD::BUILTIN_OP_END,
+  enum NodeType : unsigned {
+    // Start the numbering from where ISD NodeType finishes.
+    FIRST_NUMBER = ISD::BUILTIN_OP_END,
 
-      // Jump and link (call)
-      JmpLink,
+    // Jump and link (call)
+    JmpLink,
 
-      // Tail call
-      TailCall,
+    // Tail call
+    TailCall,
 
-      // Get the Highest (63-48) 16 bits from a 64-bit immediate
-      Highest,
+    // Get the Highest (63-48) 16 bits from a 64-bit immediate
+    Highest,
 
-      // Get the Higher (47-32) 16 bits from a 64-bit immediate
-      Higher,
+    // Get the Higher (47-32) 16 bits from a 64-bit immediate
+    Higher,
 
-      // Get the High 16 bits from a 32/64-bit immediate
-      // No relation with Mips Hi register
-      Hi,
+    // Get the High 16 bits from a 32/64-bit immediate
+    // No relation with Mips Hi register
+    Hi,
 
-      // Get the Lower 16 bits from a 32/64-bit immediate
-      // No relation with Mips Lo register
-      Lo,
+    // Get the Lower 16 bits from a 32/64-bit immediate
+    // No relation with Mips Lo register
+    Lo,
 
-      // Get the High 16 bits from a 32 bit immediate for accessing the GOT.
-      GotHi,
+    // Get the High 16 bits from a 32 bit immediate for accessing the GOT.
+    GotHi,
 
-      // Get the High 16 bits from a 32-bit immediate for accessing TLS.
-      TlsHi,
+    // Get the High 16 bits from a 32-bit immediate for accessing TLS.
+    TlsHi,
 
-      // Handle gp_rel (small data/bss sections) relocation.
-      GPRel,
+    // Handle gp_rel (small data/bss sections) relocation.
+    GPRel,
 
-      // Thread Pointer
-      ThreadPointer,
-
-      // Vector Floating Point Multiply and Subtract
-      FMS,
-
-      // Floating Point Branch Conditional
-      FPBrcond,
-
-      // Floating Point Compare
-      FPCmp,
-
-      // Floating point Abs
-      FAbs,
-
-      // Floating point select
-      FSELECT,
-
-      // Node used to generate an MTC1 i32 to f64 instruction
-      MTC1_D64,
-
-      // Floating Point Conditional Moves
-      CMovFP_T,
-      CMovFP_F,
-
-      // FP-to-int truncation node.
-      TruncIntFP,
-
-      // Return
-      Ret,
-
-      // Interrupt, exception, error trap Return
-      ERet,
-
-      // Software Exception Return.
-      EH_RETURN,
-
-      // Node used to extract integer from accumulator.
-      MFHI,
-      MFLO,
-
-      // Node used to insert integers to accumulator.
-      MTLOHI,
-
-      // Mult nodes.
-      Mult,
-      Multu,
-
-      // MAdd/Sub nodes
-      MAdd,
-      MAddu,
-      MSub,
-      MSubu,
-
-      // DivRem(u)
-      DivRem,
-      DivRemU,
-      DivRem16,
-      DivRemU16,
-
-      BuildPairF64,
-      ExtractElementF64,
-
-      Wrapper,
-
-      DynAlloc,
-
-      Sync,
-
-      Ext,
-      Ins,
-      CIns,
-
-      // EXTR.W intrinsic nodes.
-      EXTP,
-      EXTPDP,
-      EXTR_S_H,
-      EXTR_W,
-      EXTR_R_W,
-      EXTR_RS_W,
-      SHILO,
-      MTHLIP,
-
-      // DPA.W intrinsic nodes.
-      MULSAQ_S_W_PH,
-      MAQ_S_W_PHL,
-      MAQ_S_W_PHR,
-      MAQ_SA_W_PHL,
-      MAQ_SA_W_PHR,
-      DPAU_H_QBL,
-      DPAU_H_QBR,
-      DPSU_H_QBL,
-      DPSU_H_QBR,
-      DPAQ_S_W_PH,
-      DPSQ_S_W_PH,
-      DPAQ_SA_L_W,
-      DPSQ_SA_L_W,
-      DPA_W_PH,
-      DPS_W_PH,
-      DPAQX_S_W_PH,
-      DPAQX_SA_W_PH,
-      DPAX_W_PH,
-      DPSX_W_PH,
-      DPSQX_S_W_PH,
-      DPSQX_SA_W_PH,
-      MULSA_W_PH,
-
-      MULT,
-      MULTU,
-      MADD_DSP,
-      MADDU_DSP,
-      MSUB_DSP,
-      MSUBU_DSP,
-
-      // DSP shift nodes.
-      SHLL_DSP,
-      SHRA_DSP,
-      SHRL_DSP,
-
-      // DSP setcc and select_cc nodes.
-      SETCC_DSP,
-      SELECT_CC_DSP,
-
-      // Vector comparisons.
-      // These take a vector and return a boolean.
-      VALL_ZERO,
-      VANY_ZERO,
-      VALL_NONZERO,
-      VANY_NONZERO,
-
-      // These take a vector and return a vector bitmask.
-      VCEQ,
-      VCLE_S,
-      VCLE_U,
-      VCLT_S,
-      VCLT_U,
-
-      // Vector Shuffle with mask as an operand
-      VSHF,  // Generic shuffle
-      SHF,   // 4-element set shuffle.
-      ILVEV, // Interleave even elements
-      ILVOD, // Interleave odd elements
-      ILVL,  // Interleave left elements
-      ILVR,  // Interleave right elements
-      PCKEV, // Pack even elements
-      PCKOD, // Pack odd elements
-
-      // Vector Lane Copy
-      INSVE, // Copy element from one vector to another
-
-      // Combined (XOR (OR $a, $b), -1)
-      VNOR,
-
-      // Extended vector element extraction
-      VEXTRACT_SEXT_ELT,
-      VEXTRACT_ZEXT_ELT,
-
-      // Double select nodes for machines without conditional-move.
-      DOUBLE_SELECT_I,
-      DOUBLE_SELECT_I64,
-
-      // Load/Store Left/Right nodes.
-      LWL = ISD::FIRST_TARGET_MEMORY_OPCODE,
-      LWR,
-      SWL,
-      SWR,
-      LDL,
-      LDR,
-      SDL,
-      SDR
-    };
+    // Thread Pointer
+    ThreadPointer,
+
+    // Vector Floating Point Multiply and Subtract
+    FMS,
+
+    // Floating Point Branch Conditional
+    FPBrcond,
+
+    // Floating Point Compare
+    FPCmp,
+
+    // Floating point Abs
+    FAbs,
+
+    // Floating point select
+    FSELECT,
+
+    // Node used to generate an MTC1 i32 to f64 instruction
+    MTC1_D64,
+
+    // Floating Point Conditional Moves
+    CMovFP_T,
+    CMovFP_F,
+
+    // FP-to-int truncation node.
+    TruncIntFP,
+
+    // Return
+    Ret,
+
+    // Interrupt, exception, error trap Return
+    ERet,
+
+    // Software Exception Return.
+    EH_RETURN,
+
+    // Node used to extract integer from accumulator.
+    MFHI,
+    MFLO,
+
+    // Node used to insert integers to accumulator.
+    MTLOHI,
+
+    // Mult nodes.
+    Mult,
+    Multu,
+
+    // MAdd/Sub nodes
+    MAdd,
+    MAddu,
+    MSub,
+    MSubu,
+
+    // DivRem(u)
+    DivRem,
+    DivRemU,
+    DivRem16,
+    DivRemU16,
+
+    BuildPairF64,
+    ExtractElementF64,
+
+    Wrapper,
+
+    DynAlloc,
+
+    Sync,
+
+    Ext,
+    Ins,
+    CIns,
+
+    // EXTR.W intrinsic nodes.
+    EXTP,
+    EXTPDP,
+    EXTR_S_H,
+    EXTR_W,
+    EXTR_R_W,
+    EXTR_RS_W,
+    SHILO,
+    MTHLIP,
+
+    // DPA.W intrinsic nodes.
+    MULSAQ_S_W_PH,
+    MAQ_S_W_PHL,
+    MAQ_S_W_PHR,
+    MAQ_SA_W_PHL,
+    MAQ_SA_W_PHR,
+    DPAU_H_QBL,
+    DPAU_H_QBR,
+    DPSU_H_QBL,
+    DPSU_H_QBR,
+    DPAQ_S_W_PH,
+    DPSQ_S_W_PH,
+    DPAQ_SA_L_W,
+    DPSQ_SA_L_W,
+    DPA_W_PH,
+    DPS_W_PH,
+    DPAQX_S_W_PH,
+    DPAQX_SA_W_PH,
+    DPAX_W_PH,
+    DPSX_W_PH,
+    DPSQX_S_W_PH,
+    DPSQX_SA_W_PH,
+    MULSA_W_PH,
+
+    MULT,
+    MULTU,
+    MADD_DSP,
+    MADDU_DSP,
+    MSUB_DSP,
+    MSUBU_DSP,
+
+    // DSP shift nodes.
+    SHLL_DSP,
+    SHRA_DSP,
+    SHRL_DSP,
+
+    // DSP setcc and select_cc nodes.
+    SETCC_DSP,
+    SELECT_CC_DSP,
+
+    // Vector comparisons.
+    // These take a vector and return a boolean.
+    VALL_ZERO,
+    VANY_ZERO,
+    VALL_NONZERO,
+    VANY_NONZERO,
+
+    // These take a vector and return a vector bitmask.
+    VCEQ,
+    VCLE_S,
+    VCLE_U,
+    VCLT_S,
+    VCLT_U,
+
+    // Vector Shuffle with mask as an operand
+    VSHF,  // Generic shuffle
+    SHF,   // 4-element set shuffle.
+    ILVEV, // Interleave even elements
+    ILVOD, // Interleave odd elements
+    ILVL,  // Interleave left elements
+    ILVR,  // Interleave right elements
+    PCKEV, // Pack even elements
+    PCKOD, // Pack odd elements
+
+    // Vector Lane Copy
+    INSVE, // Copy element from one vector to another
+
+    // Combined (XOR (OR $a, $b), -1)
+    VNOR,
+
+    // Extended vector element extraction
+    VEXTRACT_SEXT_ELT,
+    VEXTRACT_ZEXT_ELT,
+
+    // Double select nodes for machines without conditional-move.
+    DOUBLE_SELECT_I,
+    DOUBLE_SELECT_I64,
+
+    // Load/Store Left/Right nodes.
+    LWL = ISD::FIRST_TARGET_MEMORY_OPCODE,
+    LWR,
+    SWL,
+    SWR,
+    LDL,
+    LDR,
+    SDL,
+    SDR
+  };
 
   } // ene namespace MipsISD
 

``````````

</details>


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


More information about the llvm-commits mailing list