[PATCH] D106023: [AMDGPU] Mark relevant rematerializable VOP2 instructions

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 15 15:32:30 PDT 2021


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/VOP2Instructions.td:765
+let SubtargetPredicate = HasFmaakFmamkF32Insts, isReMaterializable = 1 in {
 def V_FMAMK_F32 : VOP2_Pseudo<"v_fmamk_f32", VOP_MADMK_F32, [], "">;
 
----------------
arsenm wrote:
> rampitec wrote:
> > arsenm wrote:
> > > This and the other fma flavors preserve the high bits on gfx9
> > This is f32, both f16 fma shall also zero hi bits because these are VOP2 only.
> I wrote inline asm tests a few weeks ago for all of these. The gfx9 manual says it didn't change the existing instruction behavior, but I think this was wrong. mad/mac/fma all seem to preserve (see  GCNSubtarget::zeroesHigh16BitsOfDest)
Sigh. There are some VOP1 in that list too. I probably need to avoid any 16 bit dst completely.


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

https://reviews.llvm.org/D106023



More information about the llvm-commits mailing list