• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5; CHECK-LABEL: @ifThen_bitcast(
6; CHECK: bitcast
7; CHECK: br i1 true
8define void @ifThen_bitcast() {
9  br i1 true, label %a, label %b
10
11a:
12  %x = bitcast i32 undef to float
13  br label %b
14
15b:
16  ret void
17}
18
19; CHECK-LABEL: @ifThen_ptrtoint(
20; CHECK: ptrtoint
21; CHECK: br i1 true
22define void @ifThen_ptrtoint() {
23  br i1 true, label %a, label %b
24
25a:
26  %x = ptrtoint i32* undef to i64
27  br label %b
28
29b:
30  ret void
31}
32
33; CHECK-LABEL: @ifThen_inttoptr(
34; CHECK: inttoptr
35; CHECK: br i1 true
36define void @ifThen_inttoptr() {
37  br i1 true, label %a, label %b
38
39a:
40  %x = inttoptr i64 undef to i32*
41  br label %b
42
43b:
44  ret void
45}
46
47; CHECK-LABEL: @ifThen_addrspacecast(
48; CHECK: addrspacecast
49; CHECK: br i1 true
50define void @ifThen_addrspacecast() {
51  br i1 true, label %a, label %b
52a:
53  %x = addrspacecast i32* undef to i32 addrspace(1)*
54  br label %b
55
56b:
57  ret void
58}
59
60; CHECK-LABEL: @ifThen_fptoui(
61; CHECK: fptoui
62; CHECK: br i1 true
63define void @ifThen_fptoui() {
64  br i1 true, label %a, label %b
65a:
66  %x = fptoui float undef to i32
67  br label %b
68
69b:
70  ret void
71}
72
73; CHECK-LABEL: @ifThen_fptosi(
74; CHECK: fptosi
75; CHECK: br i1 true
76define void @ifThen_fptosi() {
77  br i1 true, label %a, label %b
78a:
79  %x = fptosi float undef to i32
80  br label %b
81
82b:
83  ret void
84}
85
86; CHECK-LABEL: @ifThen_uitofp(
87; CHECK: uitofp
88; CHECK: br i1 true
89define void @ifThen_uitofp() {
90  br i1 true, label %a, label %b
91a:
92  %x = uitofp i32 undef to float
93  br label %b
94
95b:
96  ret void
97}
98
99; CHECK-LABEL: @ifThen_sitofp(
100; CHECK: sitofp
101; CHECK: br i1 true
102define void @ifThen_sitofp() {
103  br i1 true, label %a, label %b
104a:
105  %x = sitofp i32 undef to float
106  br label %b
107
108b:
109  ret void
110}
111
112; CHECK-LABEL: @ifThen_fpext(
113; CHECK: fpext
114; CHECK: br i1 true
115define void @ifThen_fpext() {
116  br i1 true, label %a, label %b
117a:
118  %x = fpext float undef to double
119  br label %b
120
121b:
122  ret void
123}
124
125; CHECK-LABEL: @ifThen_fptrunc(
126; CHECK: fptrunc
127; CHECK: br i1 true
128define void @ifThen_fptrunc() {
129  br i1 true, label %a, label %b
130a:
131  %x = fptrunc double undef to float
132  br label %b
133
134b:
135  ret void
136}
137