This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Autogenerate & pre-commit tests for D156301 and D157388
ClosedPublic

Authored by pravinjagtap on Aug 11 2023, 6:39 AM.

Diff Detail

Event Timeline

pravinjagtap created this revision.Aug 11 2023, 6:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2023, 6:39 AM
pravinjagtap requested review of this revision.Aug 11 2023, 6:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2023, 6:39 AM
arsenm added inline comments.Aug 11 2023, 10:33 AM
llvm/test/CodeGen/AMDGPU/global_atomics_optimizer_fp.ll
15

you probably want to add some syncscopes to ensure they are preserved (maybe other metadata too)

33–34

you could also just use a regular function and use a function argument

36

Probably should test return and no return variants

Added few more test points

Autogenerate, not autoupgrade in title

llvm/test/CodeGen/AMDGPU/global_atomic_optimizer_fp_rtn.ll
8 ↗(On Diff #549862)

this isn't a uniform pointer

Test clean up

pravinjagtap retitled this revision from [AMDGPU] Auto-upgrade & pre-commit tests for D156301 and D157388 to [AMDGPU] Autogenerate & pre-commit tests for D156301 and D157388.Aug 16 2023, 5:05 AM
arsenm added inline comments.Aug 16 2023, 10:40 AM
llvm/test/CodeGen/AMDGPU/global_atomic_optimizer_fp_rtn.ll
123 ↗(On Diff #550705)

If you're testing a divergent value, might as well have the pointer be divergent too

136 ↗(On Diff #550705)

should be a separate strictfp test, the strictfp is hidden

149 ↗(On Diff #550705)

Typo defalut. Also call it system

llvm/test/CodeGen/AMDGPU/global_atomics_optimizer_fp_no_rtn.ll
149 ↗(On Diff #550705)

Ditto for everything in the return version

165 ↗(On Diff #550705)

Missing space

pravinjagtap added inline comments.Aug 16 2023, 8:57 PM
llvm/test/CodeGen/AMDGPU/global_atomic_optimizer_fp_rtn.ll
136 ↗(On Diff #550705)

These atomicrmw operations are tested with following attributes and there is separate attribute for strictfp which is #2

attributes #0 = { "denormal-fp-math-f32"="preserve-sign,preserve-sign" "amdgpu-unsafe-fp-atomics"="true" }
attributes #1 = { strictfp "denormal-fp-math-f32"="preserve-sign,preserve-sign" "amdgpu-unsafe-fp-atomics"="true" }
attributes #2 = { strictfp}

Added test points for divergent address for atomic ops

arsenm added inline comments.Aug 17 2023, 5:49 AM
llvm/test/CodeGen/AMDGPU/global_atomic_optimizer_fp_rtn.ll
136 ↗(On Diff #550705)

Which is the function I pointed to, marked with attribute group 2. The test name does not indicate this is a strictfp test and it looks like it's just testing the other combinations of uniformity and scope

pravinjagtap marked an inline comment as not done.Aug 17 2023, 6:17 AM
pravinjagtap added inline comments.
llvm/test/CodeGen/AMDGPU/global_atomic_optimizer_fp_rtn.ll
136 ↗(On Diff #550705)

you want me to mangle the attributes into function name for each of them? And Yes, these tests are the combination of fadd/fsub/fmin/fmax with different scopes and also combination of uniform or divergent input values to atomicrmw (address and value).

Updated tests

arsenm accepted this revision.Aug 18 2023, 5:50 AM
This revision is now accepted and ready to land.Aug 18 2023, 5:50 AM
This revision was landed with ongoing or failed builds.Aug 18 2023, 6:51 AM
This revision was automatically updated to reflect the committed changes.