This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Don't shrink FP constants
ClosedPublic

Authored by jonpa on Jan 21 2022, 1:50 PM.

Details

Summary

Return false from ShouldShrinkFPConstant()

(on top of https://reviews.llvm.org/D115690)

Diff Detail

Event Timeline

jonpa created this revision.Jan 21 2022, 1:50 PM
jonpa requested review of this revision.Jan 21 2022, 1:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 21 2022, 1:50 PM
uweigand added inline comments.Jan 24 2022, 5:02 AM
llvm/test/CodeGen/SystemZ/call-zos-01.ll
169 ↗(On Diff #402100)

Hmm. For the 128-bit constant case, I think the lxdb remains preferable - this new version now has two instructions, which most likely will be worse. So maybe in that case we still should try to shrink?

jonpa updated this revision to Diff 402640.Jan 24 2022, 1:14 PM
jonpa marked an inline comment as done.

Updated per review (see comment below).

llvm/test/CodeGen/SystemZ/call-zos-01.ll
169 ↗(On Diff #402100)

ok, now only doing the 64-bit case (which is a no-change on SPEC).

I tried compiling this function also for Z14, but the FP 128 constant was loaded with a VL just the same regardless of what this target hook returns... So instead of checking for vector-enhancements-1, just returning true always if not 64-bit.

The other benefit of having the full constant in memory would be to use reg/mem MXDB, but I think that would be unlikely to make much difference...

uweigand accepted this revision.Jan 27 2022, 11:53 AM

LGTM, thanks!

This revision is now accepted and ready to land.Jan 27 2022, 11:53 AM
This revision was landed with ongoing or failed builds.Jan 27 2022, 2:15 PM
This revision was automatically updated to reflect the committed changes.