This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][GFX11] Add test coverage for 16-bit conversions, part 16.
AbandonedPublic

Authored by kosarev on Jun 14 2023, 5:43 AM.

Details

Diff Detail

Event Timeline

kosarev created this revision.Jun 14 2023, 5:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2023, 5:43 AM
kosarev requested review of this revision.Jun 14 2023, 5:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2023, 5:43 AM
Joe_Nash added inline comments.Jun 14 2023, 7:48 AM
llvm/test/CodeGen/AMDGPU/v_mac.ll
9

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.

kosarev added inline comments.Jun 15 2023, 4:30 AM
llvm/test/CodeGen/AMDGPU/v_mac.ll
9

Or, alternatively, maybe file a ticket, add a TODO and let the test catch the changes in the output?

Joe_Nash added inline comments.Jun 15 2023, 7:25 AM
llvm/test/CodeGen/AMDGPU/v_mac.ll
9

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.

kosarev added inline comments.Jun 15 2023, 8:12 AM
llvm/test/CodeGen/AMDGPU/v_mac.ll
9

Jay @foad, Matt @arsenm, do you know if there are good reasons for v_fma not to be generated for these inputs on GFX11?

arsenm added inline comments.Jun 15 2023, 8:14 AM
llvm/test/CodeGen/AMDGPU/v_mac.ll
9

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

I'm going to abandon this in favour of D153269, if no objections.

I'm going to abandon this in favour of D153269, if no objections.

Sounds good

kosarev abandoned this revision.Jun 20 2023, 2:51 AM
llvm/test/CodeGen/AMDGPU/v_mac.ll