[PATCH] D152909: [AMDGPU][GFX11] Add test coverage for 16-bit conversions, part 16.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 08:14:18 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/v_mac.ll:9
-; GCN: buffer_load_dword [[C:v[0-9]+]], off, s[{{[0-9]+:[0-9]+}}], 0 offset:8
-; GCN: v_mac_f32_e32 [[C]], [[A]], [[B]]
-; GCN: buffer_store_dword [[C]]
----------------
kosarev wrote:
> Joe_Nash wrote:
> > kosarev wrote:
> > > Joe_Nash wrote:
> > > > The tests in these files appear to check for usage of mac or mad. So we would need to know whether equivalent fma/fmac should be expected on GFX11, and why they are not present. There are other tests for fma on GFX11, though I'm not sure if they cover similar cases. Additionally, the hand written tests basically look for a single instruction. It seems a shame to reduce that clarity. It might be better to skip this patch. 
> > > Or, alternatively, maybe file a ticket, add a TODO and let the test catch the changes in the output?
> > That is potentially an option. But if we knew at this moment there was no way to produce fma on GFX11 from the input IR, I would prefer not to land this patch, and there would be no ticket to file.
> Jay @foad, Matt @arsenm, do you know if there are good reasons for v_fma not to be generated for these inputs on GFX11?
It's not legal because these don't have the contract flag. mad requires no denormals but doesn't require contract. fma requires contract but respects the denormal mode 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152909



More information about the llvm-commits mailing list