[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:49:00 PDT 2023
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/71275
>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 1/2] [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();
}
>From b10ee9282b94a0125a8147d00ae44e12bfe1615f Mon Sep 17 00:00:00 2001
From: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
Date: Sat, 4 Nov 2023 01:48:32 -0700
Subject: [PATCH 2/2] Make clang-format happy
---
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index 41e53e81046fef1..cd929c12eac0d4b 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -2774,8 +2774,8 @@ bool SIInstrInfo::isBranchOffsetInRange(unsigned BranchOp,
return isIntN(BranchOffsetBits, BrOffset);
}
-MachineBasicBlock *SIInstrInfo::getBranchDestBlock(
- const MachineInstr &MI) const {
+MachineBasicBlock *
+SIInstrInfo::getBranchDestBlock(const MachineInstr &MI) const {
return MI.getOperand(0).getMBB();
}
More information about the llvm-commits
mailing list