[all-commits] [llvm/llvm-project] c444f0: Reland "[SystemZ][z/OS] Fix f32 variadic argument ...

Mubariz Afzal via All-commits all-commits at lists.llvm.org
Mon Jul 18 11:27:02 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c444f037878c61bcc750855c6edbcdac8f0871a5
      https://github.com/llvm/llvm-project/commit/c444f037878c61bcc750855c6edbcdac8f0871a5
  Author: Mubariz Afzal <mubarizafzal at gmail.com>
  Date:   2022-07-18 (Mon, 18 Jul 2022)

  Changed paths:
    M llvm/lib/Target/SystemZ/SystemZCallingConv.td
    M llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
    M llvm/test/CodeGen/SystemZ/call-zos-vararg.ll

  Log Message:
  -----------
  Reland "[SystemZ][z/OS] Fix f32 variadic argument assertion"

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.

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.




More information about the All-commits mailing list