[llvm] [AMDGPU] Turn off clang-format in moveToVALU (PR #75188)

Piotr Sobczak via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 06:08:29 PST 2023


https://github.com/piotrAMD created https://github.com/llvm/llvm-project/pull/75188

None

>From d9d496c1ac33ca52cc2918a09e3e6a19b8fb894f Mon Sep 17 00:00:00 2001
From: Piotr Sobczak <piotr.sobczak at amd.com>
Date: Tue, 12 Dec 2023 14:55:41 +0100
Subject: [PATCH] [AMDGPU] Turn off clang-format in moveToVALU

---
 llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index dda54a0929c194..42eb4fa55ed525 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -5157,6 +5157,9 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
   return true;
 }
 
+// It is more readable to list mapped opcodes on the same line.
+// clang-format off
+
 unsigned SIInstrInfo::getVALUOp(const MachineInstr &MI) const {
   switch (MI.getOpcode()) {
   default: return AMDGPU::INSTRUCTION_LIST_END;
@@ -5296,6 +5299,8 @@ unsigned SIInstrInfo::getVALUOp(const MachineInstr &MI) const {
       "Unexpected scalar opcode without corresponding vector one!");
 }
 
+// clang-format on
+
 void SIInstrInfo::insertScratchExecCopy(MachineFunction &MF,
                                         MachineBasicBlock &MBB,
                                         MachineBasicBlock::iterator MBBI,



More information about the llvm-commits mailing list