This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Fix wrong codegen when stack pointer has to realign in prologue
ClosedPublic

Authored by lkail on Jul 20 2020, 7:20 PM.

Details

Summary

Current powerpc backend generates wrong code sequence if stack pointer has to realign if -fstack-clash-protection enabled. When probing in prologue, backend should generate a subtraction instruction rather than a stux instruction to realign the stack pointer.

This patch is part of fix of https://bugs.llvm.org/show_bug.cgi?id=46759

Diff Detail

Event Timeline

lkail created this revision.Jul 20 2020, 7:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2020, 7:20 PM
jsji accepted this revision as: jsji.Jul 21 2020, 7:07 AM

LGTM.

This revision is now accepted and ready to land.Jul 21 2020, 7:07 AM
This revision was automatically updated to reflect the committed changes.
hans added a comment.Jul 22 2020, 6:42 AM

Was I cc'd because you want this cherry-picked to the 11.x branch?

lkail added a comment.EditedJul 22 2020, 6:50 AM

Was I cc'd because you want this cherry-picked to the 11.x branch?

Yes. I've open https://bugs.llvm.org/show_bug.cgi?id=46759 and set it as release blocker to track the issue.

hans added a comment.Jul 22 2020, 6:56 AM

Great, I'll pick it up there. I'm reading my email in the wrong order today it seems :)