[llvm] [AMDGPU] Lower loads and stores for address space 13 (PR #209541)
Gheorghe-Teodor Bercea via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 5 22:05:18 PDT 2026
================
@@ -0,0 +1,63 @@
+//===-- AMDGPUMachineInstrs.cpp -*- C++ -*---------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+/// Convenience wrappers and helpers for AMDGPU-specific machine instructions.
+//
+//===----------------------------------------------------------------------===//
+
+#include "AMDGPUMachineInstrs.h"
+#include "Utils/AMDGPUBaseInfo.h"
+#include "llvm/CodeGen/MachineInstr.h"
+#include "llvm/Support/ErrorHandling.h"
+
+using namespace llvm;
+using namespace AMDGPUMI;
+
+static const AMDGPU::VLdStIdxOpcodeInfo &getInfo(unsigned Opcode) {
+ const AMDGPU::VLdStIdxOpcodeInfo *Info =
+ AMDGPU::getVLdStIdxOpcodeInfoByOpcode(Opcode);
+ if (!Info)
+ llvm_unreachable("unsupported V_LOAD/STORE_IDX opcode");
+ return *Info;
+}
+
+bool VLoadStoreIdxInst::isGPRIdx() const {
+ return getInfo(getOpcode()).IsGPRIdx;
----------------
doru1004 wrote:
Done
https://github.com/llvm/llvm-project/pull/209541
More information about the llvm-commits
mailing list