• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -O0 < %s | FileCheck %s
2; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -O2 < %s | FileCheck %s
3
4; Verify that returning multiple return values in registers works,
5; both with fast-isel and regular isel.
6
7define { i32, i32, i32, i32 } @foo() nounwind {
8  %A1 = insertvalue { i32, i32, i32, i32 } undef, i32 1, 0
9  %A2 = insertvalue { i32, i32, i32, i32 } %A1, i32 2, 1
10  %A3 = insertvalue { i32, i32, i32, i32 } %A2, i32 3, 2
11  %A4 = insertvalue { i32, i32, i32, i32 } %A3, i32 4, 3
12  ret { i32, i32, i32, i32 } %A4
13}
14
15; CHECK-LABEL: foo:
16; CHECK: li 3, 1
17; CHECK: li 4, 2
18; CHECK: li 5, 3
19; CHECK: li 6, 4
20; CHECK: blr
21
22