[llvm] [AMDGPU] Remove dead code in SIISelLowering (NFC) (PR #108198)

Nicolas Miller via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 05:01:07 PDT 2024


https://github.com/npmiller created https://github.com/llvm/llvm-project/pull/108198

This return is dead code as the return just above will always be taken.

>From 6d5add437c650fcb7c8a505cd5553196e2d3cf49 Mon Sep 17 00:00:00 2001
From: Nicolas Miller <nicolas.miller at codeplay.com>
Date: Wed, 11 Sep 2024 11:42:05 +0100
Subject: [PATCH] [AMDGPU] Remove dead code in SIISelLowering (NFC)

This return is dead code as the return just above will always be taken.
---
 llvm/lib/Target/AMDGPU/SIISelLowering.cpp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index 736f714ac1a77c..fb553314919096 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -16207,9 +16207,6 @@ SITargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *RMW) const {
     return isAtomicRMWLegalXChgTy(RMW)
                ? TargetLowering::AtomicExpansionKind::None
                : TargetLowering::AtomicExpansionKind::CmpXChg;
-
-    // PCIe supports add and xchg for system atomics.
-    return atomicSupportedIfLegalIntType(RMW);
   }
   case AtomicRMWInst::Add:
   case AtomicRMWInst::And:



More information about the llvm-commits mailing list