1; RUN: opt < %s -S -speculative-execution \ 2; RUN: -spec-exec-max-speculation-cost 4 -spec-exec-max-not-hoisted 3 \ 3; RUN: | FileCheck %s 4 5declare float @llvm.fabs.f32(float) nounwind readnone 6declare i32 @llvm.ctlz.i32(i32, i1) nounwind readnone 7 8declare float @unknown(float) 9declare float @unknown_readnone(float) nounwind readnone 10 11; CHECK-LABEL: @ifThen_fabs( 12; CHECK: call float @llvm.fabs.f32( 13; CHECK: br i1 true 14define void @ifThen_fabs() { 15 br i1 true, label %a, label %b 16 17a: 18 %x = call float @llvm.fabs.f32(float 1.0) 19 br label %b 20 21b: 22 ret void 23} 24 25; CHECK-LABEL: @ifThen_ctlz( 26; CHECK: call i32 @llvm.ctlz.i32( 27; CHECK: br i1 true 28define void @ifThen_ctlz() { 29 br i1 true, label %a, label %b 30 31a: 32 %x = call i32 @llvm.ctlz.i32(i32 0, i1 true) 33 br label %b 34 35b: 36 ret void 37} 38 39; CHECK-LABEL: @ifThen_call_sideeffects( 40; CHECK: br i1 true 41; CHECK: call float @unknown( 42define void @ifThen_call_sideeffects() { 43 br i1 true, label %a, label %b 44 45a: 46 %x = call float @unknown(float 1.0) 47 br label %b 48 49b: 50 ret void 51} 52 53; CHECK-LABEL: @ifThen_call_readnone( 54; CHECK: br i1 true 55; CHECK: call float @unknown_readnone( 56define void @ifThen_call_readnone() { 57 br i1 true, label %a, label %b 58a: 59 %x = call float @unknown_readnone(float 1.0) 60 br label %b 61 62b: 63 ret void 64} 65