This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add patterns for relaxed atomic ld/st into fp registers
ClosedPublic

Authored by danilaml on Jan 18 2022, 9:30 AM.

Diff Detail

Event Timeline

danilaml created this revision.Jan 18 2022, 9:30 AM
danilaml requested review of this revision.Jan 18 2022, 9:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2022, 9:30 AM

You mention unimplemented hooks in D60394 and on the github issue, so why did you go for this approach instead? Solving this in a generic manner seems like the 'good' thing to do, no?

You mention unimplemented hooks in D60394 and on the github issue, so why did you go for this approach instead? Solving this in a generic manner seems like the 'good' thing to do, no?

I didn't get an answer there and when I tried to prototype the hooks solution, I've noticed that atomic_load_N (and store) apparently is integer-only, so just to match fp AtomicLoads for correct lowering more stuff had to be introduced and it wouldn't really reduce the td boilerplate (just simplify it a bit). Maybe there is a better approach (actually, I wonder why "LD + MOV/MOV+ ST are not folded by some generic MIR pass), but I've decided to submit this targeted patch first.

samparker accepted this revision.Jan 25 2022, 3:58 AM

Okay, fair enough. I understand there's a chance of producing some illegal IR with float types for aarch64 so it's probably safer, and easier, to perform the folding here.

This revision is now accepted and ready to land.Jan 25 2022, 3:58 AM
This revision was landed with ongoing or failed builds.Jan 25 2022, 4:34 AM
This revision was automatically updated to reflect the committed changes.