File tree Expand file tree Collapse file tree 4 files changed +150
-151
lines changed Expand file tree Collapse file tree 4 files changed +150
-151
lines changed Original file line number Diff line number Diff line change 11; for.ll
2- target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
3- target triple = "x86_64-apple-macosx10.15.0"
4-
52define i32 @main () {
6- %i = alloca i32 ; int i = ...
7- store i32 0 , i32* %i ; ... = 0
3+ %i = alloca i32 ; int i = ...
4+ store i32 0 , ptr %i ; ... = 0
85 br label %start
96start:
10- %i_value = load i32 , i32* %i
11- %comparison_result = icmp slt i32 %i_value , 4 ; test if i < a
7+ %i_value = load i32 , ptr %i
8+ %comparison_result = icmp slt i32 %i_value , 4 ; Test if i < 4
129 br i1 %comparison_result , label %A , label %B
1310A:
14- ; do something A
15- %1 = add i32 %i_value , 1 ; ... = i + 1
16- store i32 %1 , i32* %i ; i = ...
11+ ; Do something A
12+ %1 = add i32 %i_value , 1 ; ... = i + 1
13+ store i32 %1 , ptr %i ; i = ...
1714 br label %start
1815B:
19- ; do something B
16+ ; Do something B
2017
2118 ret i32 0
22- }
19+ }
You can’t perform that action at this time.
0 commit comments