From 9264f06efea233d97abebd2ef12091e52f85843c Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Wed, 14 Aug 2019 17:42:11 +0200 Subject: [PATCH] Improve ?: expansion a little there's no need to prematurely convert the condition into registers before emitting the test. --- tccgen.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tccgen.c b/tccgen.c index 262f42d..bb7438b 100644 --- a/tccgen.c +++ b/tccgen.c @@ -5797,19 +5797,6 @@ static void expr_cond(void) } else if (c < 0) { /* needed to avoid having different registers saved in each branch */ - rc = RC_INT; - if (is_float(vtop->type.t)) { - rc = RC_FLOAT; -#ifdef TCC_TARGET_X86_64 - if ((vtop->type.t & VT_BTYPE) == VT_LDOUBLE) { - rc = RC_ST0; - } -#elif defined TCC_TARGET_RISCV64 - if ((vtop->type.t & VT_BTYPE) == VT_LDOUBLE) - rc = RC_INT; -#endif - } - gv(rc); save_regs(1); gv_dup(); tt = gvtst(0, 0);