1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2026-04-20 16:16:34 +00:00

Optimize NOT before branch

This commit is contained in:
David Schmenk
2017-06-07 17:41:50 -07:00
parent 7d35fd7726
commit 92535477ff
2 changed files with 25 additions and 4 deletions
+15
View File
@@ -1187,6 +1187,21 @@ int crunch_seq(t_opseq **seq)
break;
}
break; // GADDR_CODE
case LOGIC_NOT_CODE:
switch (opnext->code)
{
case BRFALSE_CODE:
op->code = BRTRUE_CODE;
op->tag = opnext->tag;
freeops = 1;
break;
case BRTRUE_CODE:
op->code = BRFALSE_CODE;
op->tag = opnext->tag;
freeops = 1;
break;
}
break; // LOGIC_NOT_CODE
}
//
// Free up crunched ops