aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Mips/mips64-sret.ll
blob: ed494e965b7d032e9546aa175ae5e9e36a22a037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; RUN: llc -march=mips64el -mcpu=mips64r2 -mattr=n64 < %s | FileCheck %s

define void @foo(i32* noalias sret %agg.result) nounwind {
entry:
; CHECK-LABEL: foo:
; CHECK: sw {{.*}}, 0($4)
; CHECK: jr $ra
; CHECK-NEXT: move $2, $4

  store i32 42, i32* %agg.result
  ret void
}

define void @bar(i32 signext %v, i32* noalias sret %agg.result) nounwind {
entry:
; CHECK-LABEL: bar:
; CHECK: sw $4, 0($5)
; CHECK: jr $ra
; CHECK-NEXT: move $2, $5

  store i32 %v, i32* %agg.result
  ret void
}