From a8a728aac26d179b9087760945574a7fb09badea Mon Sep 17 00:00:00 2001 From: Vladimir Makarov Date: Thu, 19 Dec 2019 21:59:47 +0000 Subject: re PR target/92905 (Spills float-int union to memory) 2019-12-19 Vladimir Makarov PR target/92905 * lra-constraints.c (process_alt_operands): Check offmemok when processing preferred_reload_class. 2019-12-19 Vladimir Makarov PR target/92905 * gcc.target/i386/pr92905.c: New test. From-SVN: r279596 --- gcc/lra-constraints.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'gcc/lra-constraints.c') diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 9e0f50e..a5b4eef 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -2722,11 +2722,24 @@ process_alt_operands (int only_alternative) && (targetm.preferred_output_reload_class (op, this_alternative) == NO_REGS)))) { - if (lra_dump_file != NULL) - fprintf (lra_dump_file, - " %d Non-prefered reload: reject+=%d\n", - nop, LRA_MAX_REJECT); - reject += LRA_MAX_REJECT; + if (offmemok && REG_P (op)) + { + if (lra_dump_file != NULL) + fprintf + (lra_dump_file, + " %d Spill pseudo into memory: reject+=3\n", + nop); + reject += 3; + } + else + { + if (lra_dump_file != NULL) + fprintf + (lra_dump_file, + " %d Non-prefered reload: reject+=%d\n", + nop, LRA_MAX_REJECT); + reject += LRA_MAX_REJECT; + } } if (! (MEM_P (op) && offmemok) -- cgit v1.1