This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Use LA instead of AGR in eliminateFrameIndex().
ClosedPublic

Authored by jonpa on Oct 8 2020, 4:24 AM.

Details

Summary

Since AGR clobbers CC it should not be used here.

Fixes https://bugs.llvm.org/show_bug.cgi?id=47736.

Diff Detail

Event Timeline

jonpa created this revision.Oct 8 2020, 4:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 8 2020, 4:24 AM
jonpa requested review of this revision.Oct 8 2020, 4:24 AM
uweigand added inline comments.Oct 8 2020, 7:49 AM
llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
325

I think it may be better from a micro-architecture perspective to use %r15 as the base pointer in the instruction here, i.e. swap the two source registers. So we should get something like

la %r1, 0(%r1, %r15)

I applied this all the way back to my original issue and confirmed that the coreos-installer test now passes -- thanks!
(I'll wait for the final version of this patch before I actually submit this to LLVM builds for Rust/Fedora/etc.)

jonpa updated this revision to Diff 297138.Oct 9 2020, 12:59 AM
jonpa marked an inline comment as done.

Updated per review.

uweigand accepted this revision.Oct 9 2020, 2:05 AM

LGTM, thanks!

This revision is now accepted and ready to land.Oct 9 2020, 2:05 AM
This revision was automatically updated to reflect the committed changes.