[llvm] [AMDGPU][NFC] Explicitly narrow conversions in AMDGPUBaseInfo (PR #215192)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 05:16:06 PDT 2026


https://github.com/gretay-amd updated https://github.com/llvm/llvm-project/pull/215192

>From e220f7685430ec43cb421585cd46b5eec64f490d Mon Sep 17 00:00:00 2001
From: Greta Y <Greta.Yorsh at amd.com>
Date: Thu, 6 Aug 2026 16:14:37 +0100
Subject: [PATCH 1/5] [AMDGPU][NFC] Explicitly narrow conversions in
 AMDGPUBaseInfo

This patch handles the following cases:

EncodingField::decode takes a uint64_t argument and returns it as a narrow
ValueType. Add a static_cast to make the existing narrowing conversion explicit.
The one line at AMDGPUBaseInfo.h:357 is diagnosed once per template
instantiation of EncodingField, all from that single source location;
HwregSize::decode overrides it and is a second such location.

Change the hasNamedOperand parameter Opcode from uint64_t to uint32_t to match
the type of getNamedOperandIdx, which it immediately forwards to. Every caller
already passes an unsigned opcode, so no call site changes and no new conversion
appears at any of them.

The searchable-table lookups generated into AMDGPUGenSearchableTables.inc take
uint8_t/uint16_t key parameters, while the hand-written wrappers around them
take unsigned. Add explicit narrowing conversions at the call. One source line
can hold several such arguments -- getVOPDInfoFromComponentOpcodes alone needs
three -- so the number of casts is larger than the number of warnings. The keys
are opcode enumerators, encoding-family numbers and element counts, all bounded
well below the width of the key type, so this is NFC.

MachineOperand::getImm() and MCOperand::getImm() return int64_t and are passed
to helpers taking unsigned. Add a static_cast to make the existing narrowing
conversion explicit. The operands are S_SETREG_IMM32_B32 immediates, which the
assert on the line above pins to that opcode and which the ISA defines as 32-bit
and 16-bit fields.

Function::getFnAttributeAsParsedInteger returns uint64_t and is assigned to
32-bit locals in getInitialPSInputAddr and getDynamicVGPRBlockSize. Add a
static_cast to make the existing narrowing conversion explicit.

Widening those two return types to 64 bits was considered and rejected. It would
relocate the narrowing rather than remove it, and the narrow type is the correct
one in both cases. getInitialPSInputAddr feeds
SIMachineFunctionInfo::PSInputAddr, which is unsigned, is serialised through
MIR as unsigned, and models the 32-bit SPI_PS_INPUT_ADDR register.
getDynamicVGPRBlockSize is immediately compared against 16 and 32 and returns 0
for anything else.

This fixes 19 instances of MSVC warning C4244 ("possible loss of data") in
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.{cpp,h}.

Assisted-by: Claude <noreply at anthropic.com>
---
 .../Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp    | 53 ++++++++++---------
 llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h | 10 ++--
 2 files changed, 35 insertions(+), 28 deletions(-)

diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
index e45359719d6c9..5a6ed4946fb0e 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
@@ -314,9 +314,9 @@ unsigned getCompletionActionImplicitArgPosition(unsigned CodeObjectVersion) {
 int getMIMGOpcode(unsigned BaseOpcode, unsigned MIMGEncoding,
                   unsigned VDataDwords, unsigned VAddrDwords, bool IndexedRsrc,
                   bool IndexedSamp) {
-  const MIMGInfo *Info =
-      getMIMGOpcodeHelper(BaseOpcode, MIMGEncoding, VDataDwords, VAddrDwords,
-                          IndexedRsrc, IndexedSamp);
+  const MIMGInfo *Info = getMIMGOpcodeHelper(
+      BaseOpcode, MIMGEncoding, static_cast<uint8_t>(VDataDwords),
+      static_cast<uint8_t>(VAddrDwords), IndexedRsrc, IndexedSamp);
   return Info ? Info->Opcode : -1;
 }
 
@@ -328,8 +328,9 @@ const MIMGBaseOpcodeInfo *getMIMGBaseOpcode(unsigned Opc) {
 int getMaskedMIMGOp(unsigned Opc, unsigned NewChannels) {
   const MIMGInfo *OrigInfo = getMIMGInfo(Opc);
   const MIMGInfo *NewInfo = getMIMGOpcodeHelper(
-      OrigInfo->BaseOpcode, OrigInfo->MIMGEncoding, NewChannels,
-      OrigInfo->VAddrDwords, OrigInfo->IndexedRsrc, OrigInfo->IndexedSamp);
+      OrigInfo->BaseOpcode, OrigInfo->MIMGEncoding,
+      static_cast<uint8_t>(NewChannels), OrigInfo->VAddrDwords,
+      OrigInfo->IndexedRsrc, OrigInfo->IndexedSamp);
   return NewInfo ? NewInfo->Opcode : -1;
 }
 
@@ -489,8 +490,8 @@ int getMTBUFBaseOpcode(unsigned Opc) {
 }
 
 int getMTBUFOpcode(unsigned BaseOpc, unsigned Elements) {
-  const MTBUFInfo *Info =
-      getMTBUFInfoFromBaseOpcodeAndElements(BaseOpc, Elements);
+  const MTBUFInfo *Info = getMTBUFInfoFromBaseOpcodeAndElements(
+      BaseOpc, static_cast<uint8_t>(Elements));
   return Info ? Info->Opcode : -1;
 }
 
@@ -520,8 +521,8 @@ int getMUBUFBaseOpcode(unsigned Opc) {
 }
 
 int getMUBUFOpcode(unsigned BaseOpc, unsigned Elements) {
-  const MUBUFInfo *Info =
-      getMUBUFInfoFromBaseOpcodeAndElements(BaseOpc, Elements);
+  const MUBUFInfo *Info = getMUBUFInfoFromBaseOpcodeAndElements(
+      BaseOpc, static_cast<uint8_t>(Elements));
   return Info ? Info->Opcode : -1;
 }
 
@@ -703,7 +704,7 @@ CanBeVOPD getCanBeVOPD(unsigned Opc, unsigned EncodingFamily, bool VOPD3) {
     return {false, false};
   unsigned Key =
       (Info->VOPDOp << 5) | (EncodingFamily << 1) | (VOPD3 ? 1u : 0u);
-  const VOPDXYInfo *XYInfo = getVOPDXYInfo(Key);
+  const VOPDXYInfo *XYInfo = getVOPDXYInfo(static_cast<uint16_t>(Key));
   if (!XYInfo)
     return {false, false};
   return {XYInfo->IsX, XYInfo->IsY};
@@ -890,16 +891,17 @@ int getVOPDFull(unsigned OpX, unsigned OpY, unsigned EncodingFamily,
                 bool VOPD3) {
   bool IsConvertibleToBitOp = VOPD3 ? getBitOp2(OpY) : 0;
   OpY = IsConvertibleToBitOp ? (unsigned)AMDGPU::V_BITOP3_B32_e64 : OpY;
-  const VOPDInfo *Info =
-      getVOPDInfoFromComponentOpcodes(OpX, OpY, EncodingFamily, VOPD3);
+  const VOPDInfo *Info = getVOPDInfoFromComponentOpcodes(
+      static_cast<uint8_t>(OpX), static_cast<uint8_t>(OpY),
+      static_cast<uint8_t>(EncodingFamily), VOPD3);
   return Info ? Info->Opcode : -1;
 }
 
 std::pair<unsigned, unsigned> getVOPDComponents(unsigned VOPDOpcode) {
   const VOPDInfo *Info = getVOPDOpcodeHelper(VOPDOpcode);
   assert(Info);
-  const auto *OpX = getVOPDBaseFromComponent(Info->OpX);
-  const auto *OpY = getVOPDBaseFromComponent(Info->OpY);
+  const auto *OpX = getVOPDBaseFromComponent(static_cast<uint8_t>(Info->OpX));
+  const auto *OpY = getVOPDBaseFromComponent(static_cast<uint8_t>(Info->OpY));
   assert(OpX && OpY);
   return {OpX->BaseVOP, OpY->BaseVOP};
 }
@@ -1909,7 +1911,7 @@ static int encodeCustomOperandVal(const CustomOperandVal &Op,
                                   int64_t InputVal) {
   if (InputVal < 0 || InputVal > Op.Max)
     return OPR_VAL_INVALID;
-  return Op.encode(InputVal);
+  return Op.encode(static_cast<unsigned>(InputVal));
 }
 
 static int encodeCustomOperand(const CustomOperandVal *Opr, int Size,
@@ -2335,7 +2337,7 @@ bool msgSupportsStream(int64_t MsgId, int64_t OpId,
 
 void decodeMsg(unsigned Val, uint16_t &MsgId, uint16_t &OpId,
                uint16_t &StreamId, const MCSubtargetInfo &STI) {
-  MsgId = Val & getMsgIdMask(STI);
+  MsgId = static_cast<uint16_t>(Val & getMsgIdMask(STI));
   if (isGFX11Plus(STI)) {
     OpId = 0;
     StreamId = 0;
@@ -2383,7 +2385,8 @@ bool msgDoesNotUseM0(int64_t MsgId, const MCSubtargetInfo &STI) {
 //===----------------------------------------------------------------------===//
 
 unsigned getInitialPSInputAddr(const Function &F) {
-  return F.getFnAttributeAsParsedInteger("InitialPSInputAddr", 0);
+  return static_cast<unsigned>(
+      F.getFnAttributeAsParsedInteger("InitialPSInputAddr", 0));
 }
 
 bool getHasColorExport(const Function &F) {
@@ -2398,8 +2401,8 @@ bool getHasDepthExport(const Function &F) {
 }
 
 unsigned getDynamicVGPRBlockSize(const Function &F) {
-  unsigned BlockSize =
-      F.getFnAttributeAsParsedInteger("amdgpu-dynamic-vgpr-block-size", 0);
+  unsigned BlockSize = static_cast<unsigned>(
+      F.getFnAttributeAsParsedInteger("amdgpu-dynamic-vgpr-block-size", 0));
 
   if (BlockSize == 16 || BlockSize == 32)
     return BlockSize;
@@ -3496,17 +3499,17 @@ convertSetRegImmToVgprMSBs(unsigned Imm, unsigned Simm16,
 std::optional<unsigned> convertSetRegImmToVgprMSBs(const MachineInstr &MI,
                                                    bool HasSetregVGPRMSBFixup) {
   assert(MI.getOpcode() == AMDGPU::S_SETREG_IMM32_B32);
-  return convertSetRegImmToVgprMSBs(MI.getOperand(0).getImm(),
-                                    MI.getOperand(1).getImm(),
-                                    HasSetregVGPRMSBFixup);
+  return convertSetRegImmToVgprMSBs(
+      static_cast<unsigned>(MI.getOperand(0).getImm()),
+      static_cast<unsigned>(MI.getOperand(1).getImm()), HasSetregVGPRMSBFixup);
 }
 
 std::optional<unsigned> convertSetRegImmToVgprMSBs(const MCInst &MI,
                                                    bool HasSetregVGPRMSBFixup) {
   assert(MI.getOpcode() == AMDGPU::S_SETREG_IMM32_B32_gfx12);
-  return convertSetRegImmToVgprMSBs(MI.getOperand(0).getImm(),
-                                    MI.getOperand(1).getImm(),
-                                    HasSetregVGPRMSBFixup);
+  return convertSetRegImmToVgprMSBs(
+      static_cast<unsigned>(MI.getOperand(0).getImm()),
+      static_cast<unsigned>(MI.getOperand(1).getImm()), HasSetregVGPRMSBFixup);
 }
 
 std::pair<const AMDGPU::OpName *, const AMDGPU::OpName *>
diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
index bce059a0c18a7..eba1c6fd85aad 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
@@ -337,7 +337,9 @@ struct EncodingField {
   constexpr EncodingField(ValueType Value) : Value(Value) {}
 
   constexpr uint64_t encode() const { return Value; }
-  static ValueType decode(uint64_t Encoded) { return Encoded; }
+  static ValueType decode(uint64_t Encoded) {
+    return static_cast<ValueType>(Encoded);
+  }
 };
 
 // Represents a single bit in an encoded value.
@@ -357,7 +359,7 @@ template <typename... Fields> struct EncodingFields {
 };
 
 LLVM_READONLY
-inline bool hasNamedOperand(uint64_t Opcode, OpName NamedIdx) {
+inline bool hasNamedOperand(uint32_t Opcode, OpName NamedIdx) {
   return getNamedOperandIdx(Opcode, NamedIdx) != -1;
 }
 
@@ -1178,7 +1180,9 @@ using HwregOffset = EncodingField<10, 6>;
 struct HwregSize : EncodingField<15, 11, 32> {
   using EncodingField::EncodingField;
   constexpr uint64_t encode() const { return Value - 1; }
-  static ValueType decode(uint64_t Encoded) { return Encoded + 1; }
+  static ValueType decode(uint64_t Encoded) {
+    return static_cast<ValueType>(Encoded + 1);
+  }
 };
 
 using HwregEncoding = EncodingFields<HwregId, HwregOffset, HwregSize>;

>From 4f779ad349f5b8540ae7ca34ebae300ed1f50c7a Mon Sep 17 00:00:00 2001
From: Greta Y <Greta.Yorsh at amd.com>
Date: Wed, 7 Oct 2026 10:22:04 +0100
Subject: [PATCH 2/5] [AMDGPU][NFC] Pass S_SETREG immediates as uint64_t in
 convertSetRegImmToVgprMSBs

Change the file-local helper to take Imm and Simm16 as uint64_t instead
of unsigned, which removes the casts at both callers. Simm16 is passed
straight to HwregEncoding::decode, which already takes uint64_t. Imm is
masked with VGPR_MSB_MASK (bits 12..19) before it is narrowed, so
discarding its high bits earlier made no difference.

Assisted-by: Claude <noreply at anthropic.com>
---
 llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
index 5a6ed4946fb0e..c21a892ac842c 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
@@ -3478,7 +3478,7 @@ MCRegister getVGPRWithMSBs(MCRegister Reg, unsigned MSBs,
 }
 
 static std::optional<unsigned>
-convertSetRegImmToVgprMSBs(unsigned Imm, unsigned Simm16,
+convertSetRegImmToVgprMSBs(uint64_t Imm, uint64_t Simm16,
                            bool HasSetregVGPRMSBFixup) {
   constexpr unsigned VGPRMSBShift =
       llvm::countr_zero_constexpr<unsigned>(AMDGPU::Hwreg::DST_VGPR_MSB);
@@ -3499,17 +3499,17 @@ convertSetRegImmToVgprMSBs(unsigned Imm, unsigned Simm16,
 std::optional<unsigned> convertSetRegImmToVgprMSBs(const MachineInstr &MI,
                                                    bool HasSetregVGPRMSBFixup) {
   assert(MI.getOpcode() == AMDGPU::S_SETREG_IMM32_B32);
-  return convertSetRegImmToVgprMSBs(
-      static_cast<unsigned>(MI.getOperand(0).getImm()),
-      static_cast<unsigned>(MI.getOperand(1).getImm()), HasSetregVGPRMSBFixup);
+  return convertSetRegImmToVgprMSBs(MI.getOperand(0).getImm(),
+                                    MI.getOperand(1).getImm(),
+                                    HasSetregVGPRMSBFixup);
 }
 
 std::optional<unsigned> convertSetRegImmToVgprMSBs(const MCInst &MI,
                                                    bool HasSetregVGPRMSBFixup) {
   assert(MI.getOpcode() == AMDGPU::S_SETREG_IMM32_B32_gfx12);
-  return convertSetRegImmToVgprMSBs(
-      static_cast<unsigned>(MI.getOperand(0).getImm()),
-      static_cast<unsigned>(MI.getOperand(1).getImm()), HasSetregVGPRMSBFixup);
+  return convertSetRegImmToVgprMSBs(MI.getOperand(0).getImm(),
+                                    MI.getOperand(1).getImm(),
+                                    HasSetregVGPRMSBFixup);
 }
 
 std::pair<const AMDGPU::OpName *, const AMDGPU::OpName *>

>From 83e331048a248ee21241db8ee408c0816604d479 Mon Sep 17 00:00:00 2001
From: Greta Y <Greta.Yorsh at amd.com>
Date: Wed, 7 Oct 2026 10:22:05 +0100
Subject: [PATCH 3/5] [AMDGPU][NFC] Assert that an EncodingField fits in its
 ValueType

EncodingField::decode narrows its uint64_t argument to ValueType. This
is lossless because EncodingFields::decode masks the argument to Width
bits, provided Width is no wider than ValueType. Check that at compile
time.

Assisted-by: Claude <noreply at anthropic.com>
---
 llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
index eba1c6fd85aad..5327ac65c7297 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
@@ -331,6 +331,7 @@ struct EncodingField {
   static constexpr unsigned Width = HighBit - LowBit + 1;
 
   using ValueType = unsigned;
+  static_assert(Width <= sizeof(ValueType) * 8);
   static constexpr ValueType Default = D;
 
   ValueType Value;

>From e68662b2c61f14dedb1b4230cd283dc9ccedd55a Mon Sep 17 00:00:00 2001
From: Greta Y <Greta.Yorsh at amd.com>
Date: Wed, 7 Oct 2026 10:22:05 +0100
Subject: [PATCH 4/5] [AMDGPU][NFC] Drop the casts in getVOPDComponents

These narrowings are removed separately by declaring VOPDInfo::OpX and
OpY with the width of the table key.

Assisted-by: Claude <noreply at anthropic.com>
---
 llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
index c21a892ac842c..522e76416fa83 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
@@ -900,8 +900,8 @@ int getVOPDFull(unsigned OpX, unsigned OpY, unsigned EncodingFamily,
 std::pair<unsigned, unsigned> getVOPDComponents(unsigned VOPDOpcode) {
   const VOPDInfo *Info = getVOPDOpcodeHelper(VOPDOpcode);
   assert(Info);
-  const auto *OpX = getVOPDBaseFromComponent(static_cast<uint8_t>(Info->OpX));
-  const auto *OpY = getVOPDBaseFromComponent(static_cast<uint8_t>(Info->OpY));
+  const auto *OpX = getVOPDBaseFromComponent(Info->OpX);
+  const auto *OpY = getVOPDBaseFromComponent(Info->OpY);
   assert(OpX && OpY);
   return {OpX->BaseVOP, OpY->BaseVOP};
 }

>From ee8faf115c4877e32adef873238a7f919e24954d Mon Sep 17 00:00:00 2001
From: Greta Y <Greta.Yorsh at amd.com>
Date: Wed, 7 Oct 2026 10:54:47 +0100
Subject: [PATCH 5/5] [AMDGPU][NFC] Drop the casts to the MIMG and buffer table
 lookup keys

These narrowings are removed separately by widening the VDataDwords,
VAddrDwords and elements key fields of the searchable tables, so that
the generated lookups take the same types as their callers.

Assisted-by: Claude <noreply at anthropic.com>
---
 .../Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp    | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
index 522e76416fa83..c1d66ed849da3 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
@@ -314,9 +314,9 @@ unsigned getCompletionActionImplicitArgPosition(unsigned CodeObjectVersion) {
 int getMIMGOpcode(unsigned BaseOpcode, unsigned MIMGEncoding,
                   unsigned VDataDwords, unsigned VAddrDwords, bool IndexedRsrc,
                   bool IndexedSamp) {
-  const MIMGInfo *Info = getMIMGOpcodeHelper(
-      BaseOpcode, MIMGEncoding, static_cast<uint8_t>(VDataDwords),
-      static_cast<uint8_t>(VAddrDwords), IndexedRsrc, IndexedSamp);
+  const MIMGInfo *Info =
+      getMIMGOpcodeHelper(BaseOpcode, MIMGEncoding, VDataDwords, VAddrDwords,
+                          IndexedRsrc, IndexedSamp);
   return Info ? Info->Opcode : -1;
 }
 
@@ -328,9 +328,8 @@ const MIMGBaseOpcodeInfo *getMIMGBaseOpcode(unsigned Opc) {
 int getMaskedMIMGOp(unsigned Opc, unsigned NewChannels) {
   const MIMGInfo *OrigInfo = getMIMGInfo(Opc);
   const MIMGInfo *NewInfo = getMIMGOpcodeHelper(
-      OrigInfo->BaseOpcode, OrigInfo->MIMGEncoding,
-      static_cast<uint8_t>(NewChannels), OrigInfo->VAddrDwords,
-      OrigInfo->IndexedRsrc, OrigInfo->IndexedSamp);
+      OrigInfo->BaseOpcode, OrigInfo->MIMGEncoding, NewChannels,
+      OrigInfo->VAddrDwords, OrigInfo->IndexedRsrc, OrigInfo->IndexedSamp);
   return NewInfo ? NewInfo->Opcode : -1;
 }
 
@@ -490,8 +489,8 @@ int getMTBUFBaseOpcode(unsigned Opc) {
 }
 
 int getMTBUFOpcode(unsigned BaseOpc, unsigned Elements) {
-  const MTBUFInfo *Info = getMTBUFInfoFromBaseOpcodeAndElements(
-      BaseOpc, static_cast<uint8_t>(Elements));
+  const MTBUFInfo *Info =
+      getMTBUFInfoFromBaseOpcodeAndElements(BaseOpc, Elements);
   return Info ? Info->Opcode : -1;
 }
 
@@ -521,8 +520,8 @@ int getMUBUFBaseOpcode(unsigned Opc) {
 }
 
 int getMUBUFOpcode(unsigned BaseOpc, unsigned Elements) {
-  const MUBUFInfo *Info = getMUBUFInfoFromBaseOpcodeAndElements(
-      BaseOpc, static_cast<uint8_t>(Elements));
+  const MUBUFInfo *Info =
+      getMUBUFInfoFromBaseOpcodeAndElements(BaseOpc, Elements);
   return Info ? Info->Opcode : -1;
 }
 



More information about the llvm-commits mailing list