1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | \
4 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-aix -mcpu=pwr7 \
5 ; RUN: < %s | FileCheck %s --check-prefix=CHECK-AIX64
6 ; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-aix -mcpu=pwr8 < %s | \
7 ; RUN: FileCheck %s --check-prefix=CHECK-AIX32
9 define dso_local void @mtfsb0() local_unnamed_addr #0 {
10 ; CHECK-PWR8-LABEL: mtfsb0:
11 ; CHECK-PWR8: # %bb.0: # %entry
12 ; CHECK-PWR8-NEXT: mtfsb0 10
13 ; CHECK-PWR8-NEXT: blr
15 ; CHECK-PWR7-LABEL: mtfsb0:
16 ; CHECK-PWR7: # %bb.0: # %entry
17 ; CHECK-PWR7-NEXT: mtfsb0 10
18 ; CHECK-PWR7-NEXT: blr
19 ; CHECK-LABEL: mtfsb0:
20 ; CHECK: # %bb.0: # %entry
21 ; CHECK-NEXT: mtfsb0 10
24 ; CHECK-AIX64-LABEL: mtfsb0:
25 ; CHECK-AIX64: # %bb.0: # %entry
26 ; CHECK-AIX64-NEXT: mtfsb0 10
27 ; CHECK-AIX64-NEXT: blr
29 ; CHECK-AIX32-LABEL: mtfsb0:
30 ; CHECK-AIX32: # %bb.0: # %entry
31 ; CHECK-AIX32-NEXT: mtfsb0 10
32 ; CHECK-AIX32-NEXT: blr
34 tail call void @llvm.ppc.mtfsb0(i32 10)
38 define dso_local void @mtfsb1() local_unnamed_addr #0 {
39 ; CHECK-PWR8-LABEL: mtfsb1:
40 ; CHECK-PWR8: # %bb.0: # %entry
41 ; CHECK-PWR8-NEXT: mtfsb1 0
42 ; CHECK-PWR8-NEXT: blr
44 ; CHECK-PWR7-LABEL: mtfsb1:
45 ; CHECK-PWR7: # %bb.0: # %entry
46 ; CHECK-PWR7-NEXT: mtfsb1 0
47 ; CHECK-PWR7-NEXT: blr
48 ; CHECK-LABEL: mtfsb1:
49 ; CHECK: # %bb.0: # %entry
50 ; CHECK-NEXT: mtfsb1 0
53 ; CHECK-AIX64-LABEL: mtfsb1:
54 ; CHECK-AIX64: # %bb.0: # %entry
55 ; CHECK-AIX64-NEXT: mtfsb1 0
56 ; CHECK-AIX64-NEXT: blr
58 ; CHECK-AIX32-LABEL: mtfsb1:
59 ; CHECK-AIX32: # %bb.0: # %entry
60 ; CHECK-AIX32-NEXT: mtfsb1 0
61 ; CHECK-AIX32-NEXT: blr
63 tail call void @llvm.ppc.mtfsb1(i32 0)
67 define dso_local void @callmtfsf(i32 zeroext %a) local_unnamed_addr {
68 ; CHECK-LABEL: callmtfsf:
69 ; CHECK: # %bb.0: # %entry
70 ; CHECK-NEXT: mtfprwz 0, 3
71 ; CHECK-NEXT: xscvuxddp 0, 0
72 ; CHECK-NEXT: mtfsf 7, 0
75 ; CHECK-AIX64-LABEL: callmtfsf:
76 ; CHECK-AIX64: # %bb.0: # %entry
77 ; CHECK-AIX64-NEXT: addi 4, 1, -4
78 ; CHECK-AIX64-NEXT: stw 3, -4(1)
79 ; CHECK-AIX64-NEXT: lfiwzx 0, 0, 4
80 ; CHECK-AIX64-NEXT: xscvuxddp 0, 0
81 ; CHECK-AIX64-NEXT: mtfsf 7, 0
82 ; CHECK-AIX64-NEXT: blr
84 ; CHECK-AIX32-LABEL: callmtfsf:
85 ; CHECK-AIX32: # %bb.0: # %entry
86 ; CHECK-AIX32-NEXT: addi 4, 1, -4
87 ; CHECK-AIX32-NEXT: stw 3, -4(1)
88 ; CHECK-AIX32-NEXT: lfiwzx 0, 0, 4
89 ; CHECK-AIX32-NEXT: xscvuxddp 0, 0
90 ; CHECK-AIX32-NEXT: mtfsf 7, 0
91 ; CHECK-AIX32-NEXT: blr
93 %0 = uitofp i32 %a to double
94 tail call void @llvm.ppc.mtfsf(i32 7, double %0)
98 define dso_local void @callmtfsfi(i32 zeroext %a) local_unnamed_addr {
99 ; CHECK-LABEL: callmtfsfi:
100 ; CHECK: # %bb.0: # %entry
101 ; CHECK-NEXT: mtfsfi 1, 3
104 ; CHECK-AIX64-LABEL: callmtfsfi:
105 ; CHECK-AIX64: # %bb.0: # %entry
106 ; CHECK-AIX64-NEXT: mtfsfi 1, 3
107 ; CHECK-AIX64-NEXT: blr
109 ; CHECK-AIX32-LABEL: callmtfsfi:
110 ; CHECK-AIX32: # %bb.0: # %entry
111 ; CHECK-AIX32-NEXT: mtfsfi 1, 3
112 ; CHECK-AIX32-NEXT: blr
114 tail call void @llvm.ppc.mtfsfi(i32 1, i32 3)
118 declare void @llvm.ppc.mtfsb0(i32)
119 declare void @llvm.ppc.mtfsb1(i32)
120 declare void @llvm.ppc.mtfsfi(i32, i32)
121 declare void @llvm.ppc.mtfsf(i32, double)