Hi,
I hope this is the right place to ask it, sorry if I’m wrong…
My compiler is generating this code:
(line numbers included) (Please ignore the extra br label %b0 and the whole b0)
...
54 define i32 @std_lang__rest() {
55 entry:
56 %ret = alloca i32 ; <i32*> int*
57 %0 = icmp eq i32 4, 5 ; <i1> boolean
58 br i1 %0, label %b0_t, label %b0_f
59 b0_t:
60 %1 = add i32 5, 2 ; <i32> int
61 store i32 %1, i32* %ret
62 br label %return
63 br label %b0
64 b0_f:
65 store i32 5, i32* %ret
66 br label %return
67 br label %b0
68 b0:
69 store i32 0, i32* %ret
70 br label %return
71 return:
72 %2 = load i32* %ret ; <i32> int
73 ret i32 %2
74 }
...
llvm-as std_lang.ll
llvm-as: std_lang.ll:72:5: error: instruction expected to be numbered ‘%4’
%2 = load i32* %ret ; int
^
Why %4 ??? what I did wrong?