* patch to fix PR92905
@ 2019-12-19 22:04 Vladimir Makarov
0 siblings, 0 replies; only message in thread
From: Vladimir Makarov @ 2019-12-19 22:04 UTC (permalink / raw)
To: gcc.gcc.gnu.org
[-- Attachment #1: Type: text/plain, Size: 202 bytes --]
The following patch fixes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92905
The patch was successfully bootstrapped on x86-64 and ppc64 and
benchmarked on SPEC2000 on x86-64.
Committed as r279596
[-- Attachment #2: pr92905.patch --]
[-- Type: text/x-patch, Size: 2335 bytes --]
Index: ChangeLog
===================================================================
--- ChangeLog (revision 279595)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2019-12-19 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/92905
+ * lra-constraints.c (process_alt_operands): Check offmemok when
+ processing preferred_reload_class.
+
2019-12-19 Andrew Stubbs <ams@codesourcery.com>
* config/gcn/gcn-valu.md
Index: lra-constraints.c
===================================================================
--- lra-constraints.c (revision 279523)
+++ lra-constraints.c (working copy)
@@ -2722,11 +2722,24 @@ process_alt_operands (int only_alternati
&& (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)
Index: testsuite/ChangeLog
===================================================================
--- testsuite/ChangeLog (revision 279595)
+++ testsuite/ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2019-12-19 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/92905
+ * gcc.target/i386/pr92905.c: New test.
+
2019-12-19 Richard Sandiford <richard.sandiford@arm.com>
* g++.dg/ext/sve-sizeless-2.C: Don't expect an error for
Index: testsuite/gcc.target/i386/pr92905.c
===================================================================
--- testsuite/gcc.target/i386/pr92905.c (nonexistent)
+++ testsuite/gcc.target/i386/pr92905.c (working copy)
@@ -0,0 +1,9 @@
+/* { dg-do compile { target { lp64 } } } */
+/* { dg-options "-O2 -mtune=intel" } */
+float f(float x)
+{
+ union {float f; unsigned i;} u = {x};
+ u.i |= 0x80000000;
+ return u.f;
+}
+/* { dg-final { scan-assembler-not "rsp"} } */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-12-19 22:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-19 22:04 patch to fix PR92905 Vladimir Makarov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).