This is an archive of the discontinued LLVM Phabricator instance.

AArch64: support atomic load/store in GISel
ClosedPublic

Authored by t.p.northover on May 14 2021, 2:02 AM.

Details

Reviewers
paquette
aemerson
Summary

Because of how GISel works, we can end up with atomic G_[SZ]EXTLOAD instructions, which have no patterns because they don't exist SDAG side.

In theory monotonic and unordered variants of these could use the normal instructions for better addressing modes, but I didn't manage to convince the GISel to select them (the mapping from SDAG to GISel nodes is wonky enough around loads and stores without adding atomicity). So this patch mostly tells GISel to lower the extending loads to plain ones.

Diff Detail

Unit TestsFailed

Event Timeline

t.p.northover created this revision.May 14 2021, 2:02 AM
t.p.northover requested review of this revision.May 14 2021, 2:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 14 2021, 2:02 AM
aemerson added inline comments.May 14 2021, 2:24 PM
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
487 ↗(On Diff #345375)

Why is this change needed? Does this line not prevent SEXTLOAD/ZEXTLOAD atomics from being formed?

t.p.northover added inline comments.May 28 2021, 3:50 AM
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
487 ↗(On Diff #345375)

Seems like it's not. I'll remove it.

aemerson accepted this revision.May 28 2021, 10:59 AM
This revision is now accepted and ready to land.May 28 2021, 10:59 AM
t.p.northover closed this revision.Jun 4 2021, 1:46 AM

Thanks, committed as b16ddd03753d.