1 ; Test all condition-code masks that are relevant for floating-point
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
6 define void @f1(float *%src, float %target) {
8 ; CHECK: .cfi_startproc
9 ; CHECK: .L[[LABEL:.*]]:
10 ; CHECK: ceb %f0, 0(%r2)
11 ; CHECK-NEXT: je .L[[LABEL]]
14 %val = load volatile float, float *%src
15 %cond = fcmp oeq float %target, %val
16 br i1 %cond, label %loop, label %exit
21 define void @f2(float *%src, float %target) {
23 ; CHECK: .cfi_startproc
24 ; CHECK: .L[[LABEL:.*]]:
25 ; CHECK: ceb %f0, 0(%r2)
26 ; CHECK-NEXT: jlh .L[[LABEL]]
29 %val = load volatile float, float *%src
30 %cond = fcmp one float %target, %val
31 br i1 %cond, label %loop, label %exit
36 define void @f3(float *%src, float %target) {
38 ; CHECK: .cfi_startproc
39 ; CHECK: .L[[LABEL:.*]]:
40 ; CHECK: ceb %f0, 0(%r2)
41 ; CHECK-NEXT: jle .L[[LABEL]]
44 %val = load volatile float, float *%src
45 %cond = fcmp ole float %target, %val
46 br i1 %cond, label %loop, label %exit
51 define void @f4(float *%src, float %target) {
53 ; CHECK: .cfi_startproc
54 ; CHECK: .L[[LABEL:.*]]:
55 ; CHECK: ceb %f0, 0(%r2)
56 ; CHECK-NEXT: jl .L[[LABEL]]
59 %val = load volatile float, float *%src
60 %cond = fcmp olt float %target, %val
61 br i1 %cond, label %loop, label %exit
66 define void @f5(float *%src, float %target) {
68 ; CHECK: .cfi_startproc
69 ; CHECK: .L[[LABEL:.*]]:
70 ; CHECK: ceb %f0, 0(%r2)
71 ; CHECK-NEXT: jh .L[[LABEL]]
74 %val = load volatile float, float *%src
75 %cond = fcmp ogt float %target, %val
76 br i1 %cond, label %loop, label %exit
81 define void @f6(float *%src, float %target) {
83 ; CHECK: .cfi_startproc
84 ; CHECK: .L[[LABEL:.*]]:
85 ; CHECK: ceb %f0, 0(%r2)
86 ; CHECK-NEXT: jhe .L[[LABEL]]
89 %val = load volatile float, float *%src
90 %cond = fcmp oge float %target, %val
91 br i1 %cond, label %loop, label %exit
96 define void @f7(float *%src, float %target) {
98 ; CHECK: .cfi_startproc
99 ; CHECK: .L[[LABEL:.*]]:
100 ; CHECK: ceb %f0, 0(%r2)
101 ; CHECK-NEXT: jnlh .L[[LABEL]]
104 %val = load volatile float, float *%src
105 %cond = fcmp ueq float %target, %val
106 br i1 %cond, label %loop, label %exit
111 define void @f8(float *%src, float %target) {
113 ; CHECK: .cfi_startproc
114 ; CHECK: .L[[LABEL:.*]]:
115 ; CHECK: ceb %f0, 0(%r2)
116 ; CHECK-NEXT: jne .L[[LABEL]]
119 %val = load volatile float, float *%src
120 %cond = fcmp une float %target, %val
121 br i1 %cond, label %loop, label %exit
126 define void @f9(float *%src, float %target) {
128 ; CHECK: .cfi_startproc
129 ; CHECK: .L[[LABEL:.*]]:
130 ; CHECK: ceb %f0, 0(%r2)
131 ; CHECK-NEXT: jnh .L[[LABEL]]
134 %val = load volatile float, float *%src
135 %cond = fcmp ule float %target, %val
136 br i1 %cond, label %loop, label %exit
141 define void @f10(float *%src, float %target) {
143 ; CHECK: .cfi_startproc
144 ; CHECK: .L[[LABEL:.*]]:
145 ; CHECK: ceb %f0, 0(%r2)
146 ; CHECK-NEXT: jnhe .L[[LABEL]]
149 %val = load volatile float, float *%src
150 %cond = fcmp ult float %target, %val
151 br i1 %cond, label %loop, label %exit
156 define void @f11(float *%src, float %target) {
158 ; CHECK: .cfi_startproc
159 ; CHECK: .L[[LABEL:.*]]:
160 ; CHECK: ceb %f0, 0(%r2)
161 ; CHECK-NEXT: jnle .L[[LABEL]]
164 %val = load volatile float, float *%src
165 %cond = fcmp ugt float %target, %val
166 br i1 %cond, label %loop, label %exit
171 define void @f12(float *%src, float %target) {
173 ; CHECK: .cfi_startproc
174 ; CHECK: .L[[LABEL:.*]]:
175 ; CHECK: ceb %f0, 0(%r2)
176 ; CHECK-NEXT: jnl .L[[LABEL]]
179 %val = load volatile float, float *%src
180 %cond = fcmp uge float %target, %val
181 br i1 %cond, label %loop, label %exit
186 ; "jno" == "jump if no overflow", which corresponds to "jump if ordered"
187 ; rather than "jump if not ordered" after a floating-point comparison.
188 define void @f13(float *%src, float %target) {
190 ; CHECK: .cfi_startproc
191 ; CHECK: .L[[LABEL:.*]]:
192 ; CHECK: ceb %f0, 0(%r2)
193 ; CHECK-NEXT: jno .L[[LABEL]]
196 %val = load volatile float, float *%src
197 %cond = fcmp ord float %target, %val
198 br i1 %cond, label %loop, label %exit
203 ; "jo" == "jump if overflow", which corresponds to "jump if not ordered"
204 ; rather than "jump if ordered" after a floating-point comparison.
205 define void @f14(float *%src, float %target) {
207 ; CHECK: .cfi_startproc
208 ; CHECK: .L[[LABEL:.*]]:
209 ; CHECK: ceb %f0, 0(%r2)
210 ; CHECK-NEXT: jo .L[[LABEL]]
213 %val = load volatile float, float *%src
214 %cond = fcmp uno float %target, %val
215 br i1 %cond, label %loop, label %exit