mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-22 11:45:31 -04:00
d7ad443387
Using an LLVM IR aggregate return value type containing three or more integer values causes an abort in the fast isel pass. This patch adds two more registers to RetCC_PPC64_ELF_FIS to allow returning up to four integers with fast isel, just the same as is currently supported with regular isel (RetCC_PPC). This is needed for Swift and (possibly) other non-clang frontends. Fixes PR26190. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272005 91177308-0d34-0410-b5e6-96231b3b80d8
22 lines
673 B
LLVM
22 lines
673 B
LLVM
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -O0 < %s | FileCheck %s
|
|
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -O2 < %s | FileCheck %s
|
|
|
|
; Verify that returning multiple return values in registers works,
|
|
; both with fast-isel and regular isel.
|
|
|
|
define { i32, i32, i32, i32 } @foo() nounwind {
|
|
%A1 = insertvalue { i32, i32, i32, i32 } undef, i32 1, 0
|
|
%A2 = insertvalue { i32, i32, i32, i32 } %A1, i32 2, 1
|
|
%A3 = insertvalue { i32, i32, i32, i32 } %A2, i32 3, 2
|
|
%A4 = insertvalue { i32, i32, i32, i32 } %A3, i32 4, 3
|
|
ret { i32, i32, i32, i32 } %A4
|
|
}
|
|
|
|
; CHECK-LABEL: foo:
|
|
; CHECK: li 3, 1
|
|
; CHECK: li 4, 2
|
|
; CHECK: li 5, 3
|
|
; CHECK: li 6, 4
|
|
; CHECK: blr
|
|
|