From a80116efecef3ad52b30b2917bd33947e8d0981d Mon Sep 17 00:00:00 2001 From: Dmitry Preobrazhensky Date: Tue, 13 Sep 2022 12:41:39 +0300 Subject: [PATCH] [AMDGPU][MC][GFX11] Add a helper function for identification of VOPD instructions Differential Revision: https://reviews.llvm.org/D133608 --- llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | 2 ++ llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp index b5fb390..c482eb7 100644 --- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp +++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp @@ -427,6 +427,8 @@ unsigned getVOPDOpcode(unsigned Opc) { return Info ? Info->VOPDOp : ~0u; } +bool isVOPD(unsigned Opc) { return getVOPDOpcodeHelper(Opc); } + unsigned mapWMMA2AddrTo3AddrOpcode(unsigned Opc) { const WMMAOpcodeMappingInfo *Info = getWMMAMappingInfoFrom2AddrOpcode(Opc); return Info ? Info->Opcode3Addr : ~0u; diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h index 51cf167..ceb1fcb 100644 --- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h +++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h @@ -497,6 +497,9 @@ LLVM_READONLY int getVOPDFull(unsigned OpX, unsigned OpY); LLVM_READONLY +bool isVOPD(unsigned Opc); + +LLVM_READONLY unsigned mapWMMA2AddrTo3AddrOpcode(unsigned Opc); LLVM_READONLY -- 2.7.4