ref: ca0ece0f8b28bb28836261a3dc4fdb79a1970fd7
parent: a9a44d981e099805a308e04d285c9d8f13bdb707
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Jun 7 05:36:31 EDT 2016
[cc2-qbe] Improve ternary() in cgen.c There was a bit of garbage from previous changes.
--- a/cc2/arch/qbe/cgen.c
+++ b/cc2/arch/qbe/cgen.c
@@ -319,7 +319,7 @@
ternary(Node *np)
{
Symbol *yes, *no, *phi;
- Node *ifyes, *ifno, *phinode, *yesval, *colon;
+ Node *ifyes, *ifno, *phinode, *colon;
tmpnode(np);
phi = newlabel();
@@ -332,8 +332,7 @@
colon = np->right;
cgen(np->left);
- load(np, LOADL);
- code(ASBRANCH, np->left, ifyes, ifno);
+ code(ASBRANCH, load(np, LOADL), ifyes, ifno);
setlabel(yes);
cgen(colon->left);