public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] avoid double evaluation of PIC_OFFSET_TABLE_REGNUM
@ 2016-10-27 16:14 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2016-10-27 16:14 UTC (permalink / raw)
  To: gcc-patches

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

This patch was approved for stage1 a few months back, and I've neglected 
to commit it.  There are no changes from the posted patch.

https://gcc.gnu.org/ml/gcc-patches/2016-03/msg01373.html

Committed to trunk.

[-- Attachment #2: curr --]
[-- Type: text/plain, Size: 881 bytes --]

commit 5321d430b8d2cf33ff2b5fd9d6cc3f8d1304b0a2
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Thu Mar 24 22:44:59 2016 -0500

    	* builtins.c (expand_builtin_nonlocal_goto): Avoid evaluating
    	PIC_OFFSET_TABLE_REGNUM twice.

diff --git a/gcc/builtins.c b/gcc/builtins.c
index 997c0e8..cc711a0 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -1140,8 +1140,8 @@ expand_builtin_nonlocal_goto (tree exp)
 	 to targets with a nonlocal_goto pattern; they are free
 	 to implement it in their own way.  Note also that this is
 	 a no-op if the GP register is a global invariant.)  */
-      if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM
-	  && fixed_regs[PIC_OFFSET_TABLE_REGNUM])
+      unsigned regnum = PIC_OFFSET_TABLE_REGNUM;
+      if (regnum != INVALID_REGNUM && fixed_regs[regnum])
 	emit_use (pic_offset_table_rtx);
 
       emit_indirect_jump (r_label);

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

only message in thread, other threads:[~2016-10-27 16:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-27 16:14 [committed] avoid double evaluation of PIC_OFFSET_TABLE_REGNUM Aldy Hernandez

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).