diff options
| -rw-r--r-- | peephole.c | 3 | ||||
| -rw-r--r-- | test.lang | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -435,10 +435,13 @@ Node *node_idealize(Node *n, Graph *p, Lexer *l) { lex_error_at(l, CDR(n)->src_pos, LE_ERROR, S("divisor always evaluates to zero")); } { + // TODO: this only holds true for _unsigned_ integers + /* int po2; if (T(CDR(n), N_LIT) && CDR(n)->type.t == T_INT && (po2 = u64_power_of_2(CDR(n)->val.u))) {; return NODE(N_OP_SHR, CAR(n), node_new_lit_i64(p, po2)); } + */ } break; case N_OP_OR: @@ -1,7 +1,7 @@ func main(a, b i64) i64 { let x = 2 if a < b { - x := 3 + a + x := 3 + (a / x) } else { x := 4 + (x * b) } |
