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-LABEL: mtfsb0:
11 ; CHECK: # %bb.0: # %entry
12 ; CHECK-NEXT: mtfsb0 10
15 ; CHECK-AIX64-LABEL: mtfsb0:
16 ; CHECK-AIX64: # %bb.0: # %entry
17 ; CHECK-AIX64-NEXT: mtfsb0 10
18 ; CHECK-AIX64-NEXT: blr
20 ; CHECK-AIX32-LABEL: mtfsb0:
21 ; CHECK-AIX32: # %bb.0: # %entry
22 ; CHECK-AIX32-NEXT: mtfsb0 10
23 ; CHECK-AIX32-NEXT: blr
25 tail call void @llvm.ppc.mtfsb0(i32 10)
29 define dso_local void @mtfsb1() local_unnamed_addr #0 {
30 ; CHECK-LABEL: mtfsb1:
31 ; CHECK: # %bb.0: # %entry
32 ; CHECK-NEXT: mtfsb1 0
35 ; CHECK-AIX64-LABEL: mtfsb1:
36 ; CHECK-AIX64: # %bb.0: # %entry
37 ; CHECK-AIX64-NEXT: mtfsb1 0
38 ; CHECK-AIX64-NEXT: blr
40 ; CHECK-AIX32-LABEL: mtfsb1:
41 ; CHECK-AIX32: # %bb.0: # %entry
42 ; CHECK-AIX32-NEXT: mtfsb1 0
43 ; CHECK-AIX32-NEXT: blr
45 tail call void @llvm.ppc.mtfsb1(i32 0)
49 define dso_local void @callmtfsf(i32 zeroext %a) local_unnamed_addr {
50 ; CHECK-LABEL: callmtfsf:
51 ; CHECK: # %bb.0: # %entry
52 ; CHECK-NEXT: mtfprwz 0, 3
53 ; CHECK-NEXT: xscvuxddp 0, 0
54 ; CHECK-NEXT: mtfsf 7, 0
57 ; CHECK-AIX64-LABEL: callmtfsf:
58 ; CHECK-AIX64: # %bb.0: # %entry
59 ; CHECK-AIX64-NEXT: addi 4, 1, -4
60 ; CHECK-AIX64-NEXT: stw 3, -4(1)
61 ; CHECK-AIX64-NEXT: lfiwzx 0, 0, 4
62 ; CHECK-AIX64-NEXT: xscvuxddp 0, 0
63 ; CHECK-AIX64-NEXT: mtfsf 7, 0
64 ; CHECK-AIX64-NEXT: blr
66 ; CHECK-AIX32-LABEL: callmtfsf:
67 ; CHECK-AIX32: # %bb.0: # %entry
68 ; CHECK-AIX32-NEXT: stw 3, -4(1)
69 ; CHECK-AIX32-NEXT: addi 3, 1, -4
70 ; CHECK-AIX32-NEXT: lfiwzx 0, 0, 3
71 ; CHECK-AIX32-NEXT: xscvuxddp 0, 0
72 ; CHECK-AIX32-NEXT: mtfsf 7, 0
73 ; CHECK-AIX32-NEXT: blr
75 %0 = uitofp i32 %a to double
76 tail call void @llvm.ppc.mtfsf(i32 7, double %0)
80 define dso_local void @callmtfsfi(i32 zeroext %a) local_unnamed_addr {
81 ; CHECK-LABEL: callmtfsfi:
82 ; CHECK: # %bb.0: # %entry
83 ; CHECK-NEXT: mtfsfi 1, 3
86 ; CHECK-AIX64-LABEL: callmtfsfi:
87 ; CHECK-AIX64: # %bb.0: # %entry
88 ; CHECK-AIX64-NEXT: mtfsfi 1, 3
89 ; CHECK-AIX64-NEXT: blr
91 ; CHECK-AIX32-LABEL: callmtfsfi:
92 ; CHECK-AIX32: # %bb.0: # %entry
93 ; CHECK-AIX32-NEXT: mtfsfi 1, 3
94 ; CHECK-AIX32-NEXT: blr
96 tail call void @llvm.ppc.mtfsfi(i32 1, i32 3)
100 declare void @llvm.ppc.mtfsb0(i32)
101 declare void @llvm.ppc.mtfsb1(i32)
102 declare void @llvm.ppc.mtfsfi(i32, i32)
103 declare void @llvm.ppc.mtfsf(i32, double)