1 ; RUN: opt < %s -S -speculative-execution \
2 ; RUN: -spec-exec-max-speculation-cost 4 -spec-exec-max-not-hoisted 3 \
5 declare float @llvm.fabs.f32(float) nounwind readnone
6 declare i32 @llvm.ctlz.i32(i32, i1) nounwind readnone
8 declare float @unknown(float)
9 declare float @unknown_readnone(float) nounwind readnone
11 ; CHECK-LABEL: @ifThen_fabs(
12 ; CHECK: call float @llvm.fabs.f32(
14 define void @ifThen_fabs() {
15 br i1 true, label %a, label %b
18 %x = call float @llvm.fabs.f32(float 1.0)
25 ; CHECK-LABEL: @ifThen_ctlz(
26 ; CHECK: call i32 @llvm.ctlz.i32(
28 define void @ifThen_ctlz() {
29 br i1 true, label %a, label %b
32 %x = call i32 @llvm.ctlz.i32(i32 0, i1 true)
39 ; CHECK-LABEL: @ifThen_call_sideeffects(
41 ; CHECK: call float @unknown(
42 define void @ifThen_call_sideeffects() {
43 br i1 true, label %a, label %b
46 %x = call float @unknown(float 1.0)
53 ; CHECK-LABEL: @ifThen_call_readnone(
55 ; CHECK: call float @unknown_readnone(
56 define void @ifThen_call_readnone() {
57 br i1 true, label %a, label %b
59 %x = call float @unknown_readnone(float 1.0)