This is an archive of the discontinued LLVM Phabricator instance.

tsan: add a test for vector memory accesses
ClosedPublic

Authored by dvyukov on Nov 25 2021, 6:49 AM.

Details

Summary

Add a basic test that checks races between vector/non-vector
read/write accesses of different sizes/offsets in different orders.
This gives coverage of __tsan_read/write16 callbacks.

Depends on D114591.

Diff Detail

Event Timeline

dvyukov requested review of this revision.Nov 25 2021, 6:49 AM
dvyukov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 25 2021, 6:49 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
melver accepted this revision.Nov 25 2021, 7:14 AM
melver added inline comments.
compiler-rt/test/tsan/vector_race.cpp
35

Maybe I misunderstood, but shouldn't these be 'size 16' if we vectorize?

This revision is now accepted and ready to land.Nov 25 2021, 7:14 AM
dvyukov added inline comments.Nov 25 2021, 7:17 AM
compiler-rt/test/tsan/vector_race.cpp
35

Reports are based on what's in the shadow. Shadow only stores accesses of up to 8 bytes.
The same will happen for unaligned accesses and memcpy.

This revision was automatically updated to reflect the committed changes.