Skip to content

Commit

Permalink
irgen: Regenerate test cases to emit labels of unnamed basic blocks i…
Browse files Browse the repository at this point in the history
…n comments.

Related to commit llir/llvm@abec15b.

Updates #72.
  • Loading branch information
mewmew committed Jun 18, 2016
1 parent b2ddd2b commit 601b249
Show file tree
Hide file tree
Showing 48 changed files with 111 additions and 110 deletions.
4 changes: 2 additions & 2 deletions testdata/extra/irgen/array_arg.ll
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
define void @g(i32* %a) {
0:
; <label>:0
%1 = alloca i32*
store i32* %a, i32** %1
ret void
}
define void @f() {
0:
; <label>:0
%a = alloca [5 x i32]
%1 = getelementptr [5 x i32], [5 x i32]* %a, i64 0, i64 0
call void @g(i32* %1)
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/array_ident_def.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define void @f(i32* %a) {
0:
; <label>:0
%1 = alloca i32*
%b = alloca [5 x i32]
store i32* %a, i32** %1
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/array_ident_use.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define void @f() {
0:
; <label>:0
%a = alloca [5 x i32]
%1 = getelementptr [5 x i32], [5 x i32]* %a, i64 0, i64 0
ret void
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/array_param.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define i32 @f(i32* %a) {
0:
; <label>:0
%1 = alloca i32*
store i32* %a, i32** %1
%2 = load i32*, i32** %1
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/binary_expr_add.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define i32 @f() {
0:
; <label>:0
%a = alloca i32
%b = alloca i32
%1 = load i32, i32* %a
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/binary_expr_assign.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define i32 @f() {
0:
; <label>:0
%a = alloca i32
%b = alloca i32
%1 = load i32, i32* %b
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/binary_expr_div.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define i32 @f() {
0:
; <label>:0
%a = alloca i32
%b = alloca i32
%1 = load i32, i32* %a
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/binary_expr_eq.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define i32 @f() {
0:
; <label>:0
%a = alloca i32
%b = alloca i32
%1 = load i32, i32* %a
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/binary_expr_ge.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define i32 @f() {
0:
; <label>:0
%a = alloca i32
%b = alloca i32
%1 = load i32, i32* %a
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/binary_expr_gt.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define i32 @f() {
0:
; <label>:0
%a = alloca i32
%b = alloca i32
%1 = load i32, i32* %a
Expand Down
6 changes: 3 additions & 3 deletions testdata/extra/irgen/binary_expr_land.ll
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
define i32 @f() {
0:
; <label>:0
%a = alloca i32
%b = alloca i32
%1 = load i32, i32* %a
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %6
3:
; <label>:3
%4 = load i32, i32* %b
%5 = icmp ne i32 %4, 0
br label %6
6:
; <label>:6
%7 = phi i1 [ false, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/binary_expr_le.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define i32 @f() {
0:
; <label>:0
%a = alloca i32
%b = alloca i32
%1 = load i32, i32* %a
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/binary_expr_lt.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define i32 @f() {
0:
; <label>:0
%a = alloca i32
%b = alloca i32
%1 = load i32, i32* %a
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/binary_expr_mul.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define i32 @f() {
0:
; <label>:0
%a = alloca i32
%b = alloca i32
%1 = load i32, i32* %a
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/binary_expr_ne.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define i32 @f() {
0:
; <label>:0
%a = alloca i32
%b = alloca i32
%1 = load i32, i32* %a
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/binary_expr_sub.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define i32 @f() {
0:
; <label>:0
%a = alloca i32
%b = alloca i32
%1 = load i32, i32* %a
Expand Down
4 changes: 2 additions & 2 deletions testdata/extra/irgen/call_expr.ll
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
define i32 @g(i32 %a) {
0:
; <label>:0
%1 = alloca i32
store i32 %a, i32* %1
ret i32 42
}
define i32 @f() {
0:
; <label>:0
%1 = call i32 @g(i32 1)
ret i32 %1
}
4 changes: 2 additions & 2 deletions testdata/extra/irgen/call_expr_cast.ll
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
define i32 @g(i8 %a) {
0:
; <label>:0
%1 = alloca i8
store i8 %a, i8* %1
ret i32 42
}
define i32 @f() {
0:
; <label>:0
%x = alloca i32
%1 = load i32, i32* %x
%2 = trunc i32 %1 to i8
Expand Down
4 changes: 2 additions & 2 deletions testdata/extra/irgen/call_expr_multi_args.ll
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
define i32 @g(i32 %a, i32 %b) {
0:
; <label>:0
%1 = alloca i32
%2 = alloca i32
store i32 %a, i32* %1
store i32 %b, i32* %2
ret i32 42
}
define i32 @f() {
0:
; <label>:0
%x = alloca i32
%y = alloca i32
%1 = load i32, i32* %y
Expand Down
4 changes: 2 additions & 2 deletions testdata/extra/irgen/call_expr_multi_args_cast.ll
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
define i32 @g(i8 %a, i8 %b) {
0:
; <label>:0
%1 = alloca i8
%2 = alloca i8
store i8 %a, i8* %1
store i8 %b, i8* %2
ret i32 42
}
define i32 @f() {
0:
; <label>:0
%x = alloca i32
%y = alloca i32
%1 = load i32, i32* %y
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/expr_ret.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define i32 @f() {
0:
; <label>:0
%x = alloca i32
%1 = load i32, i32* %x
ret i32 %1
Expand Down
4 changes: 2 additions & 2 deletions testdata/extra/irgen/expr_stmt.ll
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
define void @g() {
0:
; <label>:0
ret void
}
define void @f() {
0:
; <label>:0
call void @g()
ret void
}
2 changes: 1 addition & 1 deletion testdata/extra/irgen/func_param.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define i32 @f(i32 %a) {
0:
; <label>:0
%1 = alloca i32
store i32 %a, i32* %1
%2 = load i32, i32* %1
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/global_ret.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@a = global i32 0
define i32 @f() {
0:
; <label>:0
%1 = load i32, i32* @a
ret i32 %1
}
8 changes: 4 additions & 4 deletions testdata/extra/irgen/if_else_stmt.ll
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
define void @f() {
0:
; <label>:0
%x = alloca i32
%1 = load i32, i32* %x
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %4
3:
; <label>:3
br label %5
4:
; <label>:4
br label %5
5:
; <label>:5
ret void
}
6 changes: 3 additions & 3 deletions testdata/extra/irgen/if_stmt.ll
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
define void @f() {
0:
; <label>:0
%x = alloca i32
%1 = load i32, i32* %x
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %4
3:
; <label>:3
br label %4
4:
; <label>:4
ret void
}
2 changes: 1 addition & 1 deletion testdata/extra/irgen/implicit_void_ret.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define void @f() {
0:
; <label>:0
ret void
}
2 changes: 1 addition & 1 deletion testdata/extra/irgen/index_expr.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define void @f() {
0:
; <label>:0
%a = alloca [5 x i32]
%1 = getelementptr [5 x i32], [5 x i32]* %a, i64 0, i64 0
store i32 1, i32* %1
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/index_expr_def.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define void @f() {
0:
; <label>:0
%a = alloca [5 x i32]
%1 = getelementptr [5 x i32], [5 x i32]* %a, i64 0, i64 2
store i32 3, i32* %1
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/index_expr_use.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define void @f() {
0:
; <label>:0
%a = alloca [5 x i32]
%1 = getelementptr [5 x i32], [5 x i32]* %a, i64 0, i64 2
%2 = load i32, i32* %1
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/int_ident_def.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define void @f() {
0:
; <label>:0
%a = alloca i32
store i32 5, i32* %a
ret void
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/int_ident_use.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define void @f() {
0:
; <label>:0
%a = alloca i32
%1 = load i32, i32* %a
ret void
Expand Down
2 changes: 1 addition & 1 deletion testdata/extra/irgen/int_ret.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define i32 @f() {
0:
; <label>:0
ret i32 42
}
18 changes: 9 additions & 9 deletions testdata/extra/irgen/issue_68_if_land.ll
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
define void @f() {
0:
; <label>:0
%a = alloca i32
%b = alloca i32
%1 = load i32, i32* %a
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %15
3:
; <label>:3
%4 = load i32, i32* %b
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %15
6:
; <label>:6
%7 = load i32, i32* %a
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %13
9:
; <label>:9
%10 = load i32, i32* %b
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12:
; <label>:12
store i32 11, i32* %a
br label %14
13:
; <label>:13
store i32 22, i32* %a
br label %14
14:
; <label>:14
store i32 33, i32* %a
br label %16
15:
; <label>:15
store i32 44, i32* %a
br label %16
16:
; <label>:16
ret void
}
14 changes: 7 additions & 7 deletions testdata/extra/irgen/issue_68_nested_if.ll
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
define void @f() {
0:
; <label>:0
%a = alloca i32
%1 = load i32, i32* %a
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %9
3:
; <label>:3
%4 = load i32, i32* %a
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6:
; <label>:6
store i32 11, i32* %a
br label %8
7:
; <label>:7
store i32 22, i32* %a
br label %8
8:
; <label>:8
store i32 33, i32* %a
br label %10
9:
; <label>:9
store i32 44, i32* %a
br label %10
10:
; <label>:10
ret void
}
Loading

0 comments on commit 601b249

Please sign in to comment.