[RS6000] Simplify setting of fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM]
authorAlan Modra <amodra@gmail.com>
Sat, 30 Apr 2016 00:33:26 +0000 (10:03 +0930)
committerAlan Modra <amodra@gcc.gnu.org>
Sat, 30 Apr 2016 00:33:26 +0000 (10:03 +0930)
This makes the conditions look the same as other places that deal with
RS6000_PIC_OFFSET_TABLE_REGNUM, eg. first_reg_to_save.  No functional
changes.

* config/rs6000/rs6000.c (rs6000_conditional_register_usage):
Remove redundant PIC_OFFSET_TABLE_REGNUM test.  Replace with
flag_pic test for Darwin.

From-SVN: r235669

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 98bd8481bd0d8a97496ab8749375bb56e826e7d2..ea7fe2907288776113c207f2b2806953934bbbe7 100644 (file)
@@ -1,3 +1,9 @@
+2016-04-30  Alan Modra  <amodra@gmail.com>
+
+       * config/rs6000/rs6000.c (rs6000_conditional_register_usage):
+       Remove redundant PIC_OFFSET_TABLE_REGNUM test.  Replace with
+       flag_pic test for Darwin.
+
 2016-04-30  Alan Modra  <amodra@gmail.com>
 
        * regs.h (struct reg_info_t): Delete freq_calls_crossed and
index 1cbb206ff754e7dfabfb8409c0f141f47f1a3f9c..1d24aa7999f04a27527d2449b230691153d2665b 100644 (file)
@@ -8650,21 +8650,16 @@ rs6000_conditional_register_usage (void)
   if (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2)
     call_really_used_regs[2] = 0;
 
-  if (DEFAULT_ABI == ABI_V4
-      && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM
-      && flag_pic == 2)
+  if (DEFAULT_ABI == ABI_V4 && flag_pic == 2)
     fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1;
 
-  if (DEFAULT_ABI == ABI_V4
-      && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM
-      && flag_pic == 1)
+  if (DEFAULT_ABI == ABI_V4 && flag_pic == 1)
     fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM]
       = call_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM]
       = call_really_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1;
 
-  if (DEFAULT_ABI == ABI_DARWIN
-      && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM)
-      fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM]
+  if (DEFAULT_ABI == ABI_DARWIN && flag_pic)
+    fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM]
       = call_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM]
       = call_really_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1;