[PATCH] D148957: [AMDGPU] Add intrinsics for converting global pointers to resources

Anshil Gandhi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 09:50:29 PDT 2023


gandhi21299 added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:4395
+bool AMDGPULegalizerInfo::legalizePointerAsRsrcIntrin(
+    MachineInstr &MI, MachineRegisterInfo &MRI, MachineIRBuilder &B) const {
+  Register Result = MI.getOperand(0).getReg();
----------------
Might be helpful to have an assertion on the number of operands of `MI`. Is it possible that any of the operands is not a register?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148957/new/

https://reviews.llvm.org/D148957



More information about the llvm-commits mailing list