[llvm] f412171 - [VE] Use generic MEMBARRIER SDAG node [nfc]

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 17:21:00 PST 2023


Author: Philip Reames
Date: 2023-01-09T17:20:50-08:00
New Revision: f412171f71729dd042cca52ee9ae67cd859dc3b9

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

LOG: [VE] Use generic MEMBARRIER SDAG node [nfc]

Added: 
    

Modified: 
    llvm/lib/Target/VE/VEISelLowering.cpp
    llvm/lib/Target/VE/VEISelLowering.h
    llvm/lib/Target/VE/VEInstrInfo.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/VE/VEISelLowering.cpp b/llvm/lib/Target/VE/VEISelLowering.cpp
index b750a8335171d..d6b6bc26fd07a 100644
--- a/llvm/lib/Target/VE/VEISelLowering.cpp
+++ b/llvm/lib/Target/VE/VEISelLowering.cpp
@@ -948,7 +948,6 @@ const char *VETargetLowering::getTargetNodeName(unsigned Opcode) const {
     TARGET_NODE_CASE(GLOBAL_BASE_REG)
     TARGET_NODE_CASE(Hi)
     TARGET_NODE_CASE(Lo)
-    TARGET_NODE_CASE(MEMBARRIER)
     TARGET_NODE_CASE(RET_FLAG)
     TARGET_NODE_CASE(TS1AM)
     TARGET_NODE_CASE(VEC_UNPACK_LO)
@@ -1141,7 +1140,7 @@ SDValue VETargetLowering::lowerATOMIC_FENCE(SDValue Op,
   }
 
   // MEMBARRIER is a compiler barrier; it codegens to a no-op.
-  return DAG.getNode(VEISD::MEMBARRIER, DL, MVT::Other, Op.getOperand(0));
+  return DAG.getNode(ISD::MEMBARRIER, DL, MVT::Other, Op.getOperand(0));
 }
 
 TargetLowering::AtomicExpansionKind

diff  --git a/llvm/lib/Target/VE/VEISelLowering.h b/llvm/lib/Target/VE/VEISelLowering.h
index 555572284c8b0..ee913659ffdc0 100644
--- a/llvm/lib/Target/VE/VEISelLowering.h
+++ b/llvm/lib/Target/VE/VEISelLowering.h
@@ -41,7 +41,6 @@ enum NodeType : unsigned {
   GLOBAL_BASE_REG,        // Global base reg for PIC.
   Hi,                     // Hi/Lo operations, typically on a global address.
   Lo,                     // Hi/Lo operations, typically on a global address.
-  MEMBARRIER,             // Compiler barrier only; generate a no-op.
   RET_FLAG,               // Return with a flag operand.
   TS1AM,                  // A TS1AM instruction used for 1/2 bytes swap.
   VEC_UNPACK_LO,          // unpack the lo v256 slice of a packed v512 vector.

diff  --git a/llvm/lib/Target/VE/VEInstrInfo.td b/llvm/lib/Target/VE/VEInstrInfo.td
index b64491d6effb3..ef8b96e78d62e 100644
--- a/llvm/lib/Target/VE/VEInstrInfo.td
+++ b/llvm/lib/Target/VE/VEInstrInfo.td
@@ -482,10 +482,6 @@ def GetTLSAddr : SDNode<"VEISD::GETTLSADDR", SDT_SPCall,
 def GetStackTop : SDNode<"VEISD::GETSTACKTOP", SDTNone,
                         [SDNPHasChain, SDNPSideEffect]>;
 
-// MEMBARRIER
-def MemBarrier : SDNode<"VEISD::MEMBARRIER", SDTNone,
-                        [SDNPHasChain, SDNPSideEffect]>;
-
 // TS1AM
 def SDT_TS1AM : SDTypeProfile<1, 3, [SDTCisSameAs<0, 3>, SDTCisPtrTy<1>,
                                      SDTCisVT<2, i32>, SDTCisInt<3>]>;
@@ -2024,7 +2020,7 @@ def GETSTACKTOP : Pseudo<(outs I64:$dst), (ins),
 
 // MEMBARRIER
 let hasSideEffects = 1 in
-def MEMBARRIER : Pseudo<(outs), (ins), "# MEMBARRIER", [(MemBarrier)] >;
+def MEMBARRIER : Pseudo<(outs), (ins), "# MEMBARRIER", [(membarrier)] >;
 
 //===----------------------------------------------------------------------===//
 // Other patterns


        


More information about the llvm-commits mailing list