• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mcpu=pwr7 -mattr=-vsx -fast-isel -fast-isel-abort=1 < %s | FileCheck %s
2target datalayout = "E-m:e-i64:64-n32:64"
3target triple = "powerpc64-unknown-linux-gnu"
4
5define fastcc i64 @g1(i64 %g1, double %f1, i64 %g2, double %f2, i64 %g3, double %f3, i64 %g4, double %f4) #0 {
6  ret i64 %g1
7
8; CHECK-LABEL: @g1
9; CHECK-NOT: mr 3,
10; CHECK: blr
11}
12
13define fastcc i64 @g2(i64 %g1, double %f1, i64 %g2, double %f2, i64 %g3, double %f3, i64 %g4, double %f4) #0 {
14  ret i64 %g2
15
16; CHECK-LABEL: @g2
17; CHECK: mr 3, 4
18; CHECK-NEXT: blr
19}
20
21define fastcc i64 @g3(i64 %g1, double %f1, i64 %g2, double %f2, i64 %g3, double %f3, i64 %g4, double %f4) #0 {
22  ret i64 %g3
23
24; CHECK-LABEL: @g3
25; CHECK: mr 3, 5
26; CHECK-NEXT: blr
27}
28
29define fastcc double @f2(i64 %g1, double %f1, i64 %g2, double %f2, i64 %g3, double %f3, i64 %g4, double %f4) #0 {
30  ret double %f2
31
32; CHECK-LABEL: @f2
33; CHECK: fmr 1, 2
34; CHECK-NEXT: blr
35}
36
37define void @cg2(i64 %v) #0 {
38  call fastcc i64 @g1(i64 0, double 0.0, i64 %v, double 0.0, i64 0, double 0.0, i64 0, double 0.0)
39  ret void
40
41; CHECK-LABEL: @cg2
42; CHECK: mr 4, 3
43; CHECK: blr
44}
45
46define void @cf2(double %v) #0 {
47  call fastcc i64 @g1(i64 0, double 0.0, i64 0, double %v, i64 0, double 0.0, i64 0, double 0.0)
48  ret void
49
50; CHECK-LABEL: @cf2
51; CHECK: fmr 2, 1
52; CHECK: blr
53}
54
55attributes #0 = { nounwind }
56
57