• 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_shuffle(
6; CHECK: shufflevector
7; CHECK: br i1 true
8define void @ifThen_shuffle() {
9  br i1 true, label %a, label %b
10
11a:
12  %x = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> zeroinitializer
13  br label %b
14
15b:
16  ret void
17}
18
19; CHECK-LABEL: @ifThen_extract(
20; CHECK: extractelement
21; CHECK: br i1 true
22define void @ifThen_extract() {
23  br i1 true, label %a, label %b
24
25a:
26  %x = extractelement <2 x float> undef, i32 1
27  br label %b
28
29b:
30  ret void
31}
32
33
34; CHECK-LABEL: @ifThen_insert(
35; CHECK: insertelement
36; CHECK: br i1 true
37define void @ifThen_insert() {
38  br i1 true, label %a, label %b
39
40a:
41  %x = insertelement <2 x float> undef, float undef, i32 1
42  br label %b
43
44b:
45  ret void
46}
47
48; CHECK-LABEL: @ifThen_extractvalue(
49; CHECK: extractvalue
50; CHECK: br i1 true
51define void @ifThen_extractvalue() {
52  br i1 true, label %a, label %b
53
54a:
55  %x = extractvalue { i32, i32 } undef, 0
56  br label %b
57
58b:
59  ret void
60}
61
62; CHECK-LABEL: @ifThen_insertvalue(
63; CHECK: insertvalue
64; CHECK: br i1 true
65define void @ifThen_insertvalue() {
66  br i1 true, label %a, label %b
67
68a:
69  %x = insertvalue { i32, i32 } undef, i32 undef, 0
70  br label %b
71
72b:
73  ret void
74}
75
76; CHECK-LABEL: @ifThen_freeze(
77; CHECK: freeze
78; CHECK: br i1 true
79define void @ifThen_freeze() {
80  br i1 true, label %a, label %b
81
82a:
83  %x = freeze i32 undef
84  br label %b
85
86b:
87  ret void
88}
89