Skip to content

Commit b067dd6

Browse files
committed
Update tests
1 parent 3feb723 commit b067dd6

8 files changed

+42
-43
lines changed

tests/reference/llvm-expr_01-54467c1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "llvm-expr_01-54467c1.stdout",
9-
"stdout_hash": "951a792984bf209b37aafc95435eb319906b5c9cb22a62a018556f06",
9+
"stdout_hash": "959f37d41e451c0bbd728144640ad29bad8eb6dfbaf71e1bd2d45b41",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/llvm-expr_01-54467c1.stdout

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ return: ; preds = %.entry
1616

1717
define void @__module___main___main0() {
1818
.entry:
19-
%x = alloca i32, align 4
20-
%x2 = alloca i64, align 8
21-
%y = alloca float, align 4
2219
%y2 = alloca double, align 8
20+
%y = alloca float, align 4
21+
%x2 = alloca i64, align 8
22+
%x = alloca i32, align 4
2323
store i32 25, i32* %x, align 4
2424
%0 = load i32, i32* %x, align 4
2525
call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @2, i32 0, i32 0), i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @1, i32 0, i32 0))

tests/reference/llvm-func_inline_01-2d4583a.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "llvm-func_inline_01-2d4583a.stdout",
9-
"stdout_hash": "3d0670fb3a5502d046ad0acaa0b5d0f06cd05285df45bef0eca0b626",
9+
"stdout_hash": "1c8552bcbbcba5edca127739cb9b5bb01968019462c909cee8aa26ad",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/llvm-func_inline_01-2d4583a.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ return: ; preds = %unreachable_after_r
5858

5959
define void @__module___main____xx_lcompilers_changed_main_xx() {
6060
.entry:
61-
%ans = alloca i64, align 8
6261
%x = alloca i64, align 8
62+
%ans = alloca i64, align 8
6363
store i64 40, i64* %x, align 4
6464
%0 = call i64 @__module___main___fib(i64* %x)
6565
store i64 %0, i64* %ans, align 4

tests/reference/llvm-test_unary_op_03-046fb86.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "llvm-test_unary_op_03-046fb86.stdout",
9-
"stdout_hash": "8ae64ade26bcceb59c961b87142054ab443d47b4467569b01d9d24f9",
9+
"stdout_hash": "64ad587abac8ae2bc570c04dc969a26374e4abcba7a02f051325c816",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/llvm-test_unary_op_03-046fb86.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ return: ; preds = %.entry
1515

1616
define void @__module___main___f() {
1717
.entry:
18-
%i = alloca i32, align 4
1918
%res = alloca i32, align 4
19+
%i = alloca i32, align 4
2020
store i32 5, i32* %i, align 4
2121
%0 = load i32, i32* %i, align 4
2222
%1 = xor i32 %0, -1

tests/reference/llvm_dbg-expr_01-9fc5f30.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "llvm_dbg-expr_01-9fc5f30.stdout",
9-
"stdout_hash": "70643017f0ad204393988f111369cdd921c1c297149078182707cb54",
9+
"stdout_hash": "8270bd08ebf0a1ff9ee16359845337e4d39c2affdf7c5c10eb213c9b",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/llvm_dbg-expr_01-9fc5f30.stdout

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,33 @@ return: ; preds = %.entry
1616

1717
define void @__module___main___main0() !dbg !7 {
1818
.entry:
19-
%x = alloca i32, align 4, !dbg !8
20-
call void @llvm.dbg.declare(metadata i32* %x, metadata !9, metadata !DIExpression()), !dbg !11
21-
%x2 = alloca i64, align 8
22-
call void @llvm.dbg.declare(metadata i64* %x2, metadata !12, metadata !DIExpression()), !dbg !14
23-
%y = alloca float, align 4
24-
call void @llvm.dbg.declare(metadata float* %y, metadata !15, metadata !DIExpression()), !dbg !17
2519
%y2 = alloca double, align 8
26-
call void @llvm.dbg.declare(metadata double* %y2, metadata !18, metadata !DIExpression()), !dbg !20
27-
store i32 25, i32* %x, align 4, !dbg !21
28-
%0 = load i32, i32* %x, align 4, !dbg !21
29-
call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @2, i32 0, i32 0), i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @1, i32 0, i32 0)), !dbg !21
30-
br label %return, !dbg !21
20+
%y = alloca float, align 4
21+
%x2 = alloca i64, align 8
22+
%x = alloca i32, align 4
23+
call void @llvm.dbg.declare(metadata i32* %x, metadata !8, metadata !DIExpression()), !dbg !10
24+
call void @llvm.dbg.declare(metadata i64* %x2, metadata !11, metadata !DIExpression()), !dbg !13
25+
call void @llvm.dbg.declare(metadata float* %y, metadata !14, metadata !DIExpression()), !dbg !16
26+
call void @llvm.dbg.declare(metadata double* %y2, metadata !17, metadata !DIExpression()), !dbg !19
27+
store i32 25, i32* %x, align 4, !dbg !20
28+
%0 = load i32, i32* %x, align 4, !dbg !20
29+
call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @2, i32 0, i32 0), i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @1, i32 0, i32 0)), !dbg !20
30+
br label %return, !dbg !20
3131

3232
return: ; preds = %.entry
33-
ret void, !dbg !21
33+
ret void, !dbg !20
3434
}
3535

3636
; Function Attrs: nounwind readnone speculatable willreturn
3737
declare void @llvm.dbg.declare(metadata, metadata, metadata) #0
3838

3939
declare void @_lfortran_printf(i8*, ...)
4040

41-
define i32 @main(i32 %0, i8** %1) !dbg !22 {
41+
define i32 @main(i32 %0, i8** %1) !dbg !21 {
4242
.entry:
43-
call void @_lpython_call_initial_functions(i32 %0, i8** %1), !dbg !25
44-
call void @__module___main_____main__global_stmts(), !dbg !25
45-
ret i32 0, !dbg !25
43+
call void @_lpython_call_initial_functions(i32 %0, i8** %1), !dbg !24
44+
call void @__module___main_____main__global_stmts(), !dbg !24
45+
ret i32 0, !dbg !24
4646
}
4747

4848
declare void @_lpython_call_initial_functions(i32, i8**)
@@ -59,21 +59,20 @@ attributes #0 = { nounwind readnone speculatable willreturn }
5959
!5 = !{null}
6060
!6 = !DILocation(line: 9, column: 1, scope: !3)
6161
!7 = distinct !DISubprogram(name: "main0", scope: !1, file: !1, line: 1, type: !4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
62-
!8 = !DILocation(line: 1, column: 1, scope: !7)
63-
!9 = !DILocalVariable(name: "x", arg: 1, scope: !7, file: !1, line: 2, type: !10)
64-
!10 = !DIBasicType(name: "integer", size: 32, encoding: DW_ATE_signed)
65-
!11 = !DILocation(line: 2, scope: !7)
66-
!12 = !DILocalVariable(name: "x2", arg: 2, scope: !7, file: !1, line: 3, type: !13)
67-
!13 = !DIBasicType(name: "integer", size: 64, encoding: DW_ATE_signed)
68-
!14 = !DILocation(line: 3, scope: !7)
69-
!15 = !DILocalVariable(name: "y", arg: 3, scope: !7, file: !1, line: 4, type: !16)
70-
!16 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
71-
!17 = !DILocation(line: 4, scope: !7)
72-
!18 = !DILocalVariable(name: "y2", arg: 4, scope: !7, file: !1, line: 5, type: !19)
73-
!19 = !DIBasicType(name: "double", size: 64, encoding: DW_ATE_float)
74-
!20 = !DILocation(line: 5, scope: !7)
75-
!21 = !DILocation(line: 6, column: 5, scope: !7)
76-
!22 = distinct !DISubprogram(name: "main_program", scope: !1, file: !1, line: 1, type: !23, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
77-
!23 = !DISubroutineType(types: !24)
78-
!24 = !{!10}
79-
!25 = !DILocation(line: 1, column: 1, scope: !22)
62+
!8 = !DILocalVariable(name: "x", arg: 1, scope: !7, file: !1, line: 2, type: !9)
63+
!9 = !DIBasicType(name: "integer", size: 32, encoding: DW_ATE_signed)
64+
!10 = !DILocation(line: 2, scope: !7)
65+
!11 = !DILocalVariable(name: "x2", arg: 2, scope: !7, file: !1, line: 3, type: !12)
66+
!12 = !DIBasicType(name: "integer", size: 64, encoding: DW_ATE_signed)
67+
!13 = !DILocation(line: 3, scope: !7)
68+
!14 = !DILocalVariable(name: "y", arg: 3, scope: !7, file: !1, line: 4, type: !15)
69+
!15 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
70+
!16 = !DILocation(line: 4, scope: !7)
71+
!17 = !DILocalVariable(name: "y2", arg: 4, scope: !7, file: !1, line: 5, type: !18)
72+
!18 = !DIBasicType(name: "double", size: 64, encoding: DW_ATE_float)
73+
!19 = !DILocation(line: 5, scope: !7)
74+
!20 = !DILocation(line: 6, column: 5, scope: !7)
75+
!21 = distinct !DISubprogram(name: "main_program", scope: !1, file: !1, line: 1, type: !22, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
76+
!22 = !DISubroutineType(types: !23)
77+
!23 = !{!9}
78+
!24 = !DILocation(line: 1, column: 1, scope: !21)

0 commit comments

Comments
 (0)