This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen][test] XFAIL CodeGen/Generic/ForceStackAlign.ll on SPARC
ClosedPublic

Authored by ro on Feb 7 2022, 2:20 AM.

Details

Summary

CodeGen/Generic/ForceStackAlign.ll FAILs on SPARC like this:

LLVM ERROR: Function "g" required stack re-alignment, but LLVM couldn't handle it (probably because it has a dynamic alloca).

According to the comments in llvm/lib/Target/Sparc/SparcFrameLowering.cpp (SparcFrameLowering::emitPrologue) and SparcRegisterInfo.cpp (SparcRegisterInfo::canRealignStack) this isn't going to change any time soon, so this patch XFAILs the test.

Tested on sparcv9-sun-solaris2.11.

Diff Detail

Event Timeline

ro created this revision.Feb 7 2022, 2:20 AM
ro requested review of this revision.Feb 7 2022, 2:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 7 2022, 2:20 AM

Added @nickdesaulniers who authored D103048. Looking at the changes to this test in that patch, I'm wondering whether we should have an alternate version that forces the stack alignment the way it was done prior to that patch, to test that particular mechanism on Sparc?

Was the llc flag -stack-alignment=32 previously being ignored on sparc?

nickdesaulniers accepted this revision.Feb 7 2022, 11:20 AM
This revision is now accepted and ready to land.Feb 7 2022, 11:20 AM
ro added a comment.Feb 7 2022, 11:55 PM

Was the llc flag -stack-alignment=32 previously being ignored on sparc?

Seems so: I tried llc 12.0.0 and it silently ignores the option on SPARC.

This revision was landed with ongoing or failed builds.Feb 7 2022, 11:58 PM
This revision was automatically updated to reflect the committed changes.