[llvm] [AMDGPU] IGLP: Fixes for VMEM load detection and unsigned int handling (PR #135090)

Robert Imschweiler via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 10 05:07:34 PDT 2025


================
@@ -80,6 +80,10 @@ enum class SchedGroupMask {
   LLVM_MARK_AS_BITMASK_ENUM(/* LargestFlag = */ ALL)
 };
 
+static bool handleAsVMEMInstr(const MachineInstr &MI, const SIInstrInfo *TII) {
+  return TII->isVMEM(MI) || (TII->isFLAT(MI) && !TII->isDS(MI));
----------------
ro-i wrote:

I just copied the condition I found in the original code and put it in a separate little utility function so I could reuse it at places in the code where the condition has not been updated manually. The `TII->isVMEM(MI) || (TII->isFLAT(MI) && !TII->isDS(MI))` condition was introduced in https://reviews.llvm.org/D128158, but not reused consequently.
Now it is used consequently.
But I can check what happens if it is not used at all...

https://github.com/llvm/llvm-project/pull/135090


More information about the llvm-commits mailing list