[llvm] [AMDGPU] Remove dead handling of S_SETPC_B64 (PR #71275)

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 4 01:33:21 PDT 2023


https://github.com/rampitec created https://github.com/llvm/llvm-project/pull/71275

At the very least there are no tests covering this. Nothing breaks when I remove it.

>From ad64e8fde37bd7552bbd57508224c06c7b5c0bb8 Mon Sep 17 00:00:00 2001
From: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
Date: Sat, 4 Nov 2023 01:31:18 -0700
Subject: [PATCH] [AMDGPU] Remove dead handling of S_SETPC_B64

At the very least there are no tests covering this. Nothing breaks
when I remove it.
---
 llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index d73328d67f6078e..41e53e81046fef1 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -2776,12 +2776,6 @@ bool SIInstrInfo::isBranchOffsetInRange(unsigned BranchOp,
 
 MachineBasicBlock *SIInstrInfo::getBranchDestBlock(
   const MachineInstr &MI) const {
-  if (MI.getOpcode() == AMDGPU::S_SETPC_B64) {
-    // This would be a difficult analysis to perform, but can always be legal so
-    // there's no need to analyze it.
-    return nullptr;
-  }
-
   return MI.getOperand(0).getMBB();
 }
 



More information about the llvm-commits mailing list