[PATCH] D114643: [AMDGPU] Aggressively fold immediates in SIFoldOperands

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 09:25:59 PDT 2022


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIFoldOperands.cpp:149-151
-// Wrapper around isInlineConstant that understands special cases when
-// instruction types are replaced during operand folding.
-static bool isInlineConstantIfFolded(const SIInstrInfo *TII,
----------------
arsenm wrote:
> Don't we still need to consider this for deciding to fold fma/fmak for f16?
I don't see why. "isInline" functions are just asking whether it's free to fold a constant (i.e. no increase in code size). The actual legality checks are done later in tryAddToFoldList.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114643



More information about the llvm-commits mailing list