File tree Expand file tree Collapse file tree 1 file changed +33
-6
lines changed
llvm/test/Transforms/SimplifyCFG Expand file tree Collapse file tree 1 file changed +33
-6
lines changed Original file line number Diff line number Diff line change 1
- ; RUN: opt < %s -simplifycfg -S | not grep br
1
+ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2
+ ; RUN: opt < %s -simplifycfg -S | FileCheck %s
2
3
3
4
define void @foo (i1 %C , i32* %P ) {
4
- br i1 %C , label %T , label %F
5
+ ; CHECK-LABEL: @foo(
6
+ ; CHECK-NEXT: store i32 7, i32* [[P:%.*]]
7
+ ; CHECK-NEXT: ret void
8
+ ;
9
+ br i1 %C , label %T , label %F
5
10
T: ; preds = %0
6
- store i32 7 , i32* %P
7
- ret void
11
+ store i32 7 , i32* %P
12
+ ret void
8
13
F: ; preds = %0
9
- store i32 7 , i32* %P
10
- ret void
14
+ store i32 7 , i32* %P
15
+ ret void
16
+ }
17
+
18
+ define float @PR39535min (float %x ) {
19
+ ; CHECK-LABEL: @PR39535min(
20
+ ; CHECK-NEXT: entry:
21
+ ; CHECK-NEXT: [[TOBOOL:%.*]] = fcmp une float [[X:%.*]], 0.000000e+00
22
+ ; CHECK-NEXT: [[DOTX:%.*]] = select i1 [[TOBOOL]], float 0.000000e+00, float [[X]]
23
+ ; CHECK-NEXT: ret float [[DOTX]]
24
+ ;
25
+ entry:
26
+ %tobool = fcmp une float %x , 0 .0
27
+ br i1 %tobool , label %cond.true , label %cond.false
28
+
29
+ cond.true:
30
+ br label %cond.end
31
+
32
+ cond.false:
33
+ br label %cond.end
34
+
35
+ cond.end:
36
+ %cond = phi fast float [ 0 .0 , %cond.true ], [ %x , %cond.false ]
37
+ ret float %cond
11
38
}
You can’t perform that action at this time.
0 commit comments