This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: mark atomic instructions as sources of divergence
ClosedPublic

Authored by nhaehnle on Mar 14 2016, 1:03 PM.

Details

Summary

As explained by the comment, threads will typically see different values
returned by atomic instructions even if the arguments are equal.

Diff Detail

Repository
rL LLVM

Event Timeline

nhaehnle updated this revision to Diff 50631.Mar 14 2016, 1:03 PM
nhaehnle retitled this revision from to AMDGPU: mark atomic instructions as sources of divergence.
nhaehnle updated this object.
nhaehnle added reviewers: arsenm, tstellarAMD.
nhaehnle added a subscriber: llvm-commits.
lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
189–195 ↗(On Diff #50631)

Are these still divergent if the return value isn't used?

arsenm edited edge metadata.Mar 16 2016, 11:18 AM

If the value is never used it doesn't matter since the use is what propagates divergence

tstellarAMD accepted this revision.Mar 16 2016, 2:32 PM
tstellarAMD edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Mar 16 2016, 2:32 PM
This revision was automatically updated to reflect the committed changes.