1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3 ; RUN: -mcpu=pwr8 < %s | FileCheck %s
4 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
5 ; RUN: -mcpu=pwr7 < %s | FileCheck %s
6 ; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-aix \
7 ; RUN: -mcpu=pwr8 < %s | FileCheck %s
8 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-aix \
9 ; RUN: -mcpu=pwr8 < %s | FileCheck %s
12 declare void @llvm.ppc.tw(i32 %a, i32 %b, i32 %c)
13 define dso_local void @test__twlgt(i32 %a, i32 %b) {
14 ; CHECK-LABEL: test__twlgt:
16 ; CHECK-NEXT: twlgt 3, 4
18 call void @llvm.ppc.tw(i32 %a, i32 %b, i32 1)
22 define dso_local void @test__twllt(i32 %a, i32 %b) {
23 ; CHECK-LABEL: test__twllt:
25 ; CHECK-NEXT: twllt 3, 4
27 call void @llvm.ppc.tw(i32 %a, i32 %b, i32 2)
31 define dso_local void @test__tw3(i32 %a, i32 %b) {
32 ; CHECK-LABEL: test__tw3:
34 ; CHECK-NEXT: tw 3, 3, 4
36 call void @llvm.ppc.tw(i32 %a, i32 %b, i32 3)
40 define dso_local void @test__tweq(i32 %a, i32 %b) {
41 ; CHECK-LABEL: test__tweq:
43 ; CHECK-NEXT: tweq 3, 4
45 call void @llvm.ppc.tw(i32 %a, i32 %b, i32 4)
49 define dso_local void @test__twlge(i32 %a, i32 %b) {
50 ; CHECK-LABEL: test__twlge:
52 ; CHECK-NEXT: tw 5, 3, 4
54 call void @llvm.ppc.tw(i32 %a, i32 %b, i32 5)
58 define dso_local void @test__twlle(i32 %a, i32 %b) {
59 ; CHECK-LABEL: test__twlle:
61 ; CHECK-NEXT: tw 6, 3, 4
63 call void @llvm.ppc.tw(i32 %a, i32 %b, i32 6)
67 define dso_local void @test__twgt(i32 %a, i32 %b) {
68 ; CHECK-LABEL: test__twgt:
70 ; CHECK-NEXT: twgt 3, 4
72 call void @llvm.ppc.tw(i32 %a, i32 %b, i32 8)
76 define dso_local void @test__twge(i32 %a, i32 %b) {
77 ; CHECK-LABEL: test__twge:
79 ; CHECK-NEXT: tw 12, 3, 4
81 call void @llvm.ppc.tw(i32 %a, i32 %b, i32 12)
85 define dso_local void @test__twlt(i32 %a, i32 %b) {
86 ; CHECK-LABEL: test__twlt:
88 ; CHECK-NEXT: twlt 3, 4
90 call void @llvm.ppc.tw(i32 %a, i32 %b, i32 16)
94 define dso_local void @test__twle(i32 %a, i32 %b) {
95 ; CHECK-LABEL: test__twle:
97 ; CHECK-NEXT: tw 20, 3, 4
99 call void @llvm.ppc.tw(i32 %a, i32 %b, i32 20)
103 define dso_local void @test__twne24(i32 %a, i32 %b) {
104 ; CHECK-LABEL: test__twne24:
106 ; CHECK-NEXT: twne 3, 4
108 call void @llvm.ppc.tw(i32 %a, i32 %b, i32 24)
112 define dso_local void @test__twu(i32 %a, i32 %b) {
113 ; CHECK-LABEL: test__twu:
115 ; CHECK-NEXT: twu 3, 4
117 call void @llvm.ppc.tw(i32 %a, i32 %b, i32 31)
121 define dso_local void @test__tw_no_match(i32 %a, i32 %b) {
122 ; CHECK-LABEL: test__tw_no_match:
124 ; CHECK-NEXT: tw 13, 3, 4
126 call void @llvm.ppc.tw(i32 %a, i32 %b, i32 13)
131 declare void @llvm.ppc.trap(i32 %a)
132 define dso_local void @test__trap(i32 %a) {
133 ; CHECK-LABEL: test__trap:
135 ; CHECK-NEXT: twnei 3, 0
137 call void @llvm.ppc.trap(i32 %a)