File tree 1 file changed +33
-0
lines changed
llvm/test/Transforms/PhaseOrdering
1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes
2
+ ; RUN: opt -O2 -S < %s | FileCheck %s
3
+
4
+ declare void @g ()
5
+
6
+ define internal i32 @h1 (i32 %a , i32 %b ) {
7
+ %c = add i32 %a , %b
8
+ %c2 = add i32 2 , %c
9
+ ret i32 %c2
10
+ }
11
+
12
+ define internal i32 @h2 (i32 %a , i32 %b ) {
13
+ %c = add i32 %a , %b
14
+ %c2 = add i32 2 , %c
15
+ ret i32 %c2
16
+ }
17
+
18
+ define void @f (i32 %a , i32 %b ) noinline {
19
+ ; CHECK: Function Attrs: noinline
20
+ ; CHECK-LABEL: @f(
21
+ ; CHECK-NEXT: end:
22
+ ; CHECK-NEXT: ret void
23
+ ;
24
+ %c = call i32 @h1 (i32 %a , i32 %b )
25
+ %d = call i32 @h2 (i32 %a , i32 %b )
26
+ %i = icmp eq i32 %c , %d
27
+ br i1 %i , label %end , label %dead
28
+ dead:
29
+ call void @g ()
30
+ br label %end
31
+ end:
32
+ ret void
33
+ }
You can’t perform that action at this time.
0 commit comments