[PATCH] D125759: [AMDGPU] Remove isLiteralConstant and isLiteralConstantLike

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 16:32:33 PST 2022


arsenm requested changes to this revision.
arsenm added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:3603-3604
                                    uint8_t OperandType) const {
+  if (MO.isReg())
+    return true;
   if (!MO.isImm() ||
----------------
arsenm wrote:
> foad wrote:
> > arsenm wrote:
> > > This doesn't make any sense to me
> > Yeah, so this function needs a better name - something that means "is this operand guaranteed not to make the instruction 4 bytes bigger?". I suppose that is (the converse of) what the isLiteralConstantLike name was supposed to imply.
> Most of the uses are checking register as is, so could this just assert on registers?
I think this should be an assert and users should have to explicitly look for registers


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125759



More information about the llvm-commits mailing list