multiblock-throwing.ll
2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; XFAIL: *
; RUN: opt < %s -basic-aa -dse -enable-dse-memoryssa -S | FileCheck %s
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
declare void @unknown_func()
define void @test6(i32* noalias %P) {
; CHECK-LABEL: @test6(
; CHECK-NEXT: store i32 0, i32* [[P:%.*]]
; CHECK-NEXT: br i1 true, label [[BB1:%.*]], label [[BB2:%.*]]
; CHECK: bb1:
; CHECK-NEXT: br label [[BB3:%.*]]
; CHECK: bb2:
; CHECK-NEXT: call void @unknown_func()
; CHECK-NEXT: br label [[BB3]]
; CHECK: bb3:
; CHECK-NEXT: store i32 0, i32* [[P]]
; CHECK-NEXT: ret void
;
store i32 0, i32* %P
br i1 true, label %bb1, label %bb2
bb1:
br label %bb3
bb2:
call void @unknown_func()
br label %bb3
bb3:
store i32 0, i32* %P
ret void
}
define i32 @test22(i32* %P, i32* noalias %Q, i32* %R) {
; CHECK-LABEL: @test22(
; CHECK-NEXT: store i32 2, i32* [[P:%.*]]
; CHECK-NEXT: store i32 3, i32* [[Q:%.*]]
; CHECK-NEXT: [[L:%.*]] = load i32, i32* [[R:%.*]]
; CHECK-NEXT: ret i32 [[L]]
;
store i32 1, i32* %Q
store i32 2, i32* %P
store i32 3, i32* %Q
%l = load i32, i32* %R
ret i32 %l
}
define void @test23(i32* noalias %P) {
; CHECK-LABEL: @test23(
; CHECK-NEXT: br i1 true, label [[BB1:%.*]], label [[BB2:%.*]]
; CHECK: bb1:
; CHECK-NEXT: br label [[BB3:%.*]]
; CHECK: bb2:
; CHECK-NEXT: call void @unknown_func()
; CHECK-NEXT: br label [[BB3]]
; CHECK: bb3:
; CHECK-NEXT: store i32 0, i32* [[P:%.*]]
; CHECK-NEXT: ret void
;
br i1 true, label %bb1, label %bb2
bb1:
store i32 0, i32* %P
br label %bb3
bb2:
call void @unknown_func()
br label %bb3
bb3:
store i32 0, i32* %P
ret void
}
define void @test24(i32* noalias %P) {
; CHECK-LABEL: @test24(
; CHECK-NEXT: br i1 true, label [[BB2:%.*]], label [[BB1:%.*]]
; CHECK: bb1:
; CHECK-NEXT: br label [[BB3:%.*]]
; CHECK: bb2:
; CHECK-NEXT: call void @unknown_func()
; CHECK-NEXT: br label [[BB3]]
; CHECK: bb3:
; CHECK-NEXT: store i32 0, i32* [[P:%.*]]
; CHECK-NEXT: ret void
;
br i1 true, label %bb2, label %bb1
bb1:
store i32 0, i32* %P
br label %bb3
bb2:
call void @unknown_func()
br label %bb3
bb3:
store i32 0, i32* %P
ret void
}