Commit 6b816b54 authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano

Fixed invalid IR

parent 42a9e648
...@@ -235,9 +235,10 @@ void build_func_fib_fast(MuIRBuilder *irbuilder) ...@@ -235,9 +235,10 @@ void build_func_fib_fast(MuIRBuilder *irbuilder)
G(0, int32) = irbuilder->gen_sym(irbuilder, "@int32"); G(0, int32) = irbuilder->gen_sym(irbuilder, "@int32");
irbuilder->new_type_int(irbuilder, G(0, int32), 32); irbuilder->new_type_int(irbuilder, G(0, int32), 32);
fib = irbuilder->gen_sym(irbuilder, "@fib"); fib = irbuilder->gen_sym(irbuilder, "@fib_f");
G(2) = irbuilder->gen_sym(irbuilder, "@__2"); G(2) = sig_fib;
irbuilder->new_funcsig(irbuilder, G(2), (MuTypeNode[]){G(0, int32)}, 1, (MuTypeNode[]){G(0, int32)}, 1); // G(2) = irbuilder->gen_sym(irbuilder, "@__2");
// irbuilder->new_funcsig(irbuilder, G(2), (MuTypeNode[]){G(0, int32)}, 1, (MuTypeNode[]){G(0, int32)}, 1);
irbuilder->new_func(irbuilder, fib, G(2)); irbuilder->new_func(irbuilder, fib, G(2));
MuID L(0, fib.__3) = irbuilder->gen_sym(irbuilder, "@fib.__3"); MuID L(0, fib.__3) = irbuilder->gen_sym(irbuilder, "@fib.__3");
MuID L(1, fib.__3.1) = irbuilder->gen_sym(irbuilder, "@fib.__3.1"); MuID L(1, fib.__3.1) = irbuilder->gen_sym(irbuilder, "@fib.__3.1");
...@@ -268,7 +269,7 @@ void build_func_fib_fast(MuIRBuilder *irbuilder) ...@@ -268,7 +269,7 @@ void build_func_fib_fast(MuIRBuilder *irbuilder)
MuID L(15) = irbuilder->gen_sym(irbuilder, NULL); MuID L(15) = irbuilder->gen_sym(irbuilder, NULL);
MuID L(16, fib.__3.5.8) = irbuilder->gen_sym(irbuilder, "@fib.__3.5.8"); MuID L(16, fib.__3.5.8) = irbuilder->gen_sym(irbuilder, "@fib.__3.5.8");
G(5) = irbuilder->gen_sym(irbuilder, "@__5"); G(5) = irbuilder->gen_sym(irbuilder, "@__5");
irbuilder->new_const_int(irbuilder, G(5), G(0, int32), -1); irbuilder->new_const_int(irbuilder, G(5), G(0, int32), (uint32_t)(-1));
irbuilder->new_binop(irbuilder, L(15), L(16, fib.__3.5.8), MU_BINOP_ADD, G(0, int32), L(13, fib.__3.5.6), G(5), MU_NO_ID); irbuilder->new_binop(irbuilder, L(15), L(16, fib.__3.5.8), MU_BINOP_ADD, G(0, int32), L(13, fib.__3.5.6), G(5), MU_NO_ID);
MuID L(17) = irbuilder->gen_sym(irbuilder, NULL); MuID L(17) = irbuilder->gen_sym(irbuilder, NULL);
...@@ -278,7 +279,7 @@ void build_func_fib_fast(MuIRBuilder *irbuilder) ...@@ -278,7 +279,7 @@ void build_func_fib_fast(MuIRBuilder *irbuilder)
MuID L(19) = irbuilder->gen_sym(irbuilder, NULL); MuID L(19) = irbuilder->gen_sym(irbuilder, NULL);
MuID L(20, fib.__3.5.10) = irbuilder->gen_sym(irbuilder, "@fib.__3.5.10"); MuID L(20, fib.__3.5.10) = irbuilder->gen_sym(irbuilder, "@fib.__3.5.10");
G(6) = irbuilder->gen_sym(irbuilder, "@__6"); G(6) = irbuilder->gen_sym(irbuilder, "@__6");
irbuilder->new_const_int(irbuilder, G(6), G(0, int32), -2); irbuilder->new_const_int(irbuilder, G(6), G(0, int32), (uint32_t)(-2));
irbuilder->new_binop(irbuilder, L(19), L(20, fib.__3.5.10), MU_BINOP_ADD, G(0, int32), L(13, fib.__3.5.6), G(6), MU_NO_ID); irbuilder->new_binop(irbuilder, L(19), L(20, fib.__3.5.10), MU_BINOP_ADD, G(0, int32), L(13, fib.__3.5.6), G(6), MU_NO_ID);
MuID L(21) = irbuilder->gen_sym(irbuilder, NULL); MuID L(21) = irbuilder->gen_sym(irbuilder, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment