public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* One more patch for PR70478
@ 2017-04-11 19:41 Vladimir Makarov
  0 siblings, 0 replies; only message in thread
From: Vladimir Makarov @ 2017-04-11 19:41 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

A recent patch for PR70478 introduced a regression on ARM.   Here is an 
additional patch to fix it.

The patch was successfully tested and bootstrapped on x86-64.

Committed as rev. 246854.



[-- Attachment #2: pr70478-3.patch --]
[-- Type: text/x-patch, Size: 1451 bytes --]

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 246853)
+++ ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2017-04-11  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/70478
+	* lra-constraints.c (process_alt_operands): Check memory for
+	disfavoring memory insn operand.
+
 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
 
 	PR middle-end/80100
Index: lra-constraints.c
===================================================================
--- lra-constraints.c	(revision 246808)
+++ lra-constraints.c	(working copy)
@@ -2722,12 +2722,14 @@ process_alt_operands (int only_alternati
 		    }
 		}
 
-	      /* When we use memory operand, the insn should read the
-		 value from memory and even if we just wrote a value
-		 into the memory it is costly in comparison with an
-		 insn alternative which does not use memory
-		 (e.g. register or immediate operand).  */
-	      if (no_regs_p && offmemok)
+	      /* When we use an operand requiring memory in given
+		 alternative, the insn should write *and* read the
+		 value to/from memory it is costly in comparison with
+		 an insn alternative which does not use memory
+		 (e.g. register or immediate operand).  We exclude
+		 memory operand for such case as we can satisfy the
+		 memory constraints by reloading address.  */
+	      if (no_regs_p && offmemok && !MEM_P (op))
 		{
 		  if (lra_dump_file != NULL)
 		    fprintf

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-11 19:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11 19:41 One more patch for PR70478 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).