[PATCH] D120813: AMDGPU: Skip tryFoldRegSequence if no valid regclasses for its users.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 2 06:59:18 PST 2022


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:4761
+  const MCInstrDesc &Desc = get(MI.getOpcode());
+  if (MI.isVariadic() || OpIdx >= Desc.getNumOperands() ||
+      Desc.OpInfo[OpIdx].RegClass == -1)
----------------
Why do you need to test isVariadic here()? Surely as long as you compare OpIdx against Desc.getNumOperands() (not MI.getNumOperands()) you're OK?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120813



More information about the llvm-commits mailing list