Page MenuHomePhabricator

Reland "[SystemZ][z/OS] Fix f32 variadic argument assertion"
AcceptedPublic

Authored by mubarizafzal on Jul 15 2022, 6:39 AM.

Details

Summary

This patch relands the f32 vararg assertion on z/OS fix that was reverted previously due to the testcase failing on non-z/OS platforms. It is now passing.

Description:

The tablegen lines that specify the XPLINK64 calling convention for promoting an f32 vararg to an f64 are effectively overwritten by the following tablegen line which bitcast an f64 vararg to an i64 (so that it can be used in the GPRs). Thus it becomes a bitcast from f32 to i64. We don't handle bitcasts for f32s and so this causes an assertion to be thrown.

We fix this by simplifying the tablegen lines to explicity show this behaviour, and allow the f32 in the bitcast case by first promoting it to an f64.

Diff Detail

Event Timeline

mubarizafzal created this revision.Jul 15 2022, 6:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 6:39 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
mubarizafzal requested review of this revision.Jul 15 2022, 6:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 6:39 AM
uweigand accepted this revision.Jul 15 2022, 7:45 AM

LGTM, thanks!

This revision is now accepted and ready to land.Jul 15 2022, 7:45 AM