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 ↗(On Diff #549371)

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

33–34 ↗(On Diff #549371)

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

36 ↗(On Diff #549371)

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
9

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

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

136

should be a separate strictfp test, the strictfp is hidden

149

Typo defalut. Also call it system

llvm/test/CodeGen/AMDGPU/global_atomics_optimizer_fp_no_rtn.ll
149

Ditto for everything in the return version

165

Missing space

pravinjagtap added inline comments.Aug 16 2023, 8:57 PM
llvm/test/CodeGen/AMDGPU/global_atomic_optimizer_fp_rtn.ll
136

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

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

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.
llvm/test/CodeGen/AMDGPU/global_atomics_scan_fmin.ll