Lines Matching refs:guard

1 ; RUN: opt -S -guard-widening < %s        | FileCheck %s
2 ; RUN: opt -S -passes=guard-widening < %s | FileCheck %s
4 declare void @llvm.experimental.guard(i1,...)
12 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %wide.chk) [ "deopt"() ]
15 call void(i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
16 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
25 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %wide.chk) [ "deopt"() ]
28 call void(i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
39 ; CHECK-NOT: call void (i1, ...) @llvm.experimental.guard(
41 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
53 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %wide.chk) [ "deopt"() ]
57 call void(i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
68 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
78 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
82 call void(i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
88 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
92 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
108 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %wide.chk) [ "deopt"() ]
112 call void(i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
117 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
130 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %wide.chk) [ "deopt"() ]
134 call void(i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
139 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
147 ; the first guard, but there is no guarantee that it will produce the
151 ; CHECK: call void (i1, ...) @llvm.experimental.guard(
152 ; CHECK: call void (i1, ...) @llvm.experimental.guard(
156 call void(i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
159 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
163 ; All else equal, we try to widen the earliest guard we can. This
171 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %wide.chk) [ "deopt"() ]
173 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %cond_2) [ "deopt"() ]
177 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
179 call void(i1, ...) @llvm.experimental.guard(i1 %cond_2) [ "deopt"() ]
184 call void(i1, ...) @llvm.experimental.guard(i1 %cond_3) [ "deopt"() ]
191 ; In this case the earliest dominating guard is in a loop, and we
200 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
207 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %wide.chk) [ "deopt"() ]
210 call void(i1, ...) @llvm.experimental.guard(i1 %cond_2) [ "deopt"() ]
215 call void(i1, ...) @llvm.experimental.guard(i1 %cond_3) [ "deopt"() ]
231 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
234 call void(i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
239 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
242 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
255 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
258 call void(i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
263 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
265 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
269 ; With guards in loops, we're okay hoisting out the guard into the
279 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %wide.chk) [ "deopt"() ]
282 call void(i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
286 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
299 ; CHECK-NEXT: call void (i1, ...) @llvm.experimental.guard(i1 %wide.chk) [ "deopt"() ]
303 call void(i1, ...) @llvm.experimental.guard(i1 true) [ "deopt"() ]
335 call void(i1, ...) @llvm.experimental.guard(i1 %cond) [ "deopt"() ]
343 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %wide.chk) [ "deopt"() ]
347 call void(i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
352 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
363 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
367 call void(i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
373 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
376 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]