[all-commits] [llvm/llvm-project] 745221: [M68k] Override `CanLowerReturn` to fix assertion ...

Ian Douglas Scott via All-commits all-commits at lists.llvm.org
Sat Apr 22 12:24:14 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 745221268125e86b1543a7aa643414e9cc8cb2d2
      https://github.com/llvm/llvm-project/commit/745221268125e86b1543a7aa643414e9cc8cb2d2
  Author: Ian Douglas Scott <ian at iandouglasscott.com>
  Date:   2023-04-22 (Sat, 22 Apr 2023)

  Changed paths:
    M llvm/lib/Target/M68k/M68kISelLowering.cpp
    M llvm/lib/Target/M68k/M68kISelLowering.h
    A llvm/test/CodeGen/M68k/multiple-return.ll

  Log Message:
  -----------
  [M68k] Override `CanLowerReturn` to fix assertion with large return

If it couldn't fit the return value in two registers, this caused an
error during codegen. It seems this method is implemented in other
backends but not here, and allows it to pass return values in memory
when it isn't able to do so in registers.

Seems to fix compilation of Rust code with certain return types:
https://github.com/rust-lang/rust/issues/89498

Differential Revision: https://reviews.llvm.org/D148856




More information about the All-commits mailing list