Fix compile time warning caused by PIC_OFFSET_TABLE_REGNUM be INVALID_REGNUM
authorJiong Wang <jiong.wang@arm.com>
Tue, 23 Sep 2014 21:19:28 +0000 (21:19 +0000)
committerJiong Wang <jiwang@gcc.gnu.org>
Tue, 23 Sep 2014 21:19:28 +0000 (21:19 +0000)
2014-09-23  Jiong Wang  <jiong.wang@arm.com>

gcc/
  * shrink-wrap.c (try_shrink_wrapping): Check PIC_OFFSET_TABLE_REGNUM not
    be INVALID_REGNUM.

From-SVN: r215533

gcc/ChangeLog
gcc/shrink-wrap.c

index f2b7b2dd79401d9cac48cf82a4f45dccc739f0ca..4d1c9149c25ab826d82abf9ed760b9e1af23e2ca 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-23  Jiong Wang  <jiong.wang@arm.com>
+
+       * shrink-wrap.c (try_shrink_wrapping): Check PIC_OFFSET_TABLE_REGNUM not
+       be INVALID_REGNUM.
+
 2014-09-23  Thomas Schwinge  <thomas@codesourcery.com>
 
        * configure: Regenerate.
index fd24135e06a7e9bf323f362f956e568511f9b301..9ae8a08ec1053b4687d0e6f76d0874f8b3006a6b 100644 (file)
@@ -495,7 +495,7 @@ try_shrink_wrapping (edge *entry_edge, edge orig_entry_edge,
       if (frame_pointer_needed)
        add_to_hard_reg_set (&set_up_by_prologue.set, Pmode,
                             HARD_FRAME_POINTER_REGNUM);
-      if (pic_offset_table_rtx)
+      if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM)
        add_to_hard_reg_set (&set_up_by_prologue.set, Pmode,
                             PIC_OFFSET_TABLE_REGNUM);
       if (crtl->drap_reg)