[Darwin, PPC] Fix PR71496 by marking pic base loads as non-copyable.
authorIain Sandoe <iain@codesourcery.com>
Sun, 11 Dec 2016 19:24:46 +0000 (19:24 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Sun, 11 Dec 2016 19:24:46 +0000 (19:24 +0000)
The Darwin pic base loads (and reloads for non-local-gotos) are not
validly copied (since the pic base label would be duplicated).  Thus,
mark the pic base {re-}loads as non-copyable.

gcc/

2016-12-11  Iain Sandoe  <iain@codesourcery.com>

PR rtl-optimization/71496
* config/rs6000/darwin.md (load_macho_picbase_si): Mark as non-
copyable.  (load_macho_picbase_di, reload_macho_picbase_si,
reload_macho_picbase_di): Likewise.

From-SVN: r243532

gcc/ChangeLog
gcc/config/rs6000/darwin.md

index 54558cd..e2809f0 100644 (file)
@@ -1,3 +1,10 @@
+2016-12-11  Iain Sandoe  <iain@codesourcery.com>
+
+       PR rtl-optimization/71496
+       * config/rs6000/darwin.md (load_macho_picbase_si): Mark as non-
+       copyable.  (load_macho_picbase_di, reload_macho_picbase_si,
+       reload_macho_picbase_di): Likewise.
+
 2012-12-11  John David Anglin  <danglin@gcc.gnu.org>
 
        * config/pa/pa.c (pa_callee_copies): New function.
index 5870e0a..9fbccd4 100644 (file)
@@ -265,6 +265,7 @@ You should have received a copy of the GNU General Public License
   return "bcl 20,31,%0\\n%0:";
 }
   [(set_attr "type" "branch")
+   (set_attr "cannot_copy" "yes")
    (set_attr "length" "4")])
 
 (define_insn "load_macho_picbase_di"
@@ -281,6 +282,7 @@ You should have received a copy of the GNU General Public License
   return "bcl 20,31,%0\\n%0:";
 }
   [(set_attr "type" "branch")
+   (set_attr "cannot_copy" "yes")
    (set_attr "length" "4")])
 
 (define_expand "macho_correct_pic"
@@ -416,6 +418,7 @@ You should have received a copy of the GNU General Public License
     return "bcl 20,31,%0\\n%0:";
 }
   [(set_attr "type" "branch")
+   (set_attr "cannot_copy" "yes")
    (set_attr "length" "4")])
 
 (define_insn "reload_macho_picbase_di"
@@ -439,6 +442,7 @@ You should have received a copy of the GNU General Public License
     return "bcl 20,31,%0\\n%0:";
 }
   [(set_attr "type" "branch")
+   (set_attr "cannot_copy" "yes")
    (set_attr "length" "4")])
 
 ;; We need to restore the PIC register, at the site of nonlocal label.