This is an archive of the discontinued LLVM Phabricator instance.

[X86] X86CallFrameOptimization - generalize slow push code path
ClosedPublic

Authored by RKSimon on Mar 16 2020, 10:40 AM.

Details

Summary

Replace the explicit isAtom() || isSLM() test with the more general (and more specific) slowTwoMemOps() check to avoid the use of the PUSHrmm push from memory case.

This is actually very tricky to test in anything but quite complex code, but the atomic-idempotent.ll tests seem to be the most straightforward to use. If people are happy with me using these tests I can add the extra target checks as a pre-commit.

Diff Detail

Event Timeline

RKSimon created this revision.Mar 16 2020, 10:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 16 2020, 10:40 AM
Herald added subscribers: jfb, hiraditya. · View Herald Transcript
craig.topper added inline comments.Mar 17 2020, 4:14 PM
llvm/test/CodeGen/X86/atomic-idempotent.ll
4

Why did SLM/GLM/KNL lose sse2, but atom got to keep it?

RKSimon updated this revision to Diff 252949.Mar 26 2020, 12:37 PM

disabled sse2 on atom to match the other targets

RKSimon marked an inline comment as done.Mar 26 2020, 12:38 PM
RKSimon added inline comments.
llvm/test/CodeGen/X86/atomic-idempotent.ll
4

Disabling sse2 was more of a technicality to force the SLM-like targets to match, but I've set atom to follow this as well to stop the fence insertion

This revision is now accepted and ready to land.Mar 28 2020, 1:43 PM
This revision was automatically updated to reflect the committed changes.