diff options
| author | WormHeamer | 2025-08-05 01:39:26 -0400 |
|---|---|---|
| committer | WormHeamer | 2025-08-05 01:39:26 -0400 |
| commit | def1b9179981081f67ed654f65ef22a55f6cdcb3 (patch) | |
| tree | 2850976304a4d0d240ca6860161d21dd6520f5aa | |
| parent | beee7d5d34d6d37649b544de33db36f389648897 (diff) | |
tragic realization: = and <> aren't communative at all
i assumed they were because it kinda makes sense to write something like
"a = b = c", but "a = (b = c)" and "(a = b) = c" are very very different
expressions. whoops!
| -rw-r--r-- | ir.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -245,7 +245,7 @@ Node *node_new_lit_bool(Proc *p, int b) { } static inline int node_op_communative(NodeType t) { - NodeType ops[] = { N_OP_ADD, N_OP_MUL, N_OP_AND, N_OP_XOR, N_OP_OR, N_CMP_EQL, N_CMP_NEQ }; + NodeType ops[] = { N_OP_ADD, N_OP_MUL, N_OP_AND, N_OP_XOR, N_OP_OR }; for (unsigned i = 0; i < sizeof ops / sizeof *ops; i++) { if (ops[i] == t) return 1; } |
