The attached change fixes the placement of a REG_EQUAL note when an insert is 
done to load
the most significant bits of a 64-bit constant.

Tested on hppa64-hp-hpux11.11 with no observed regressions.  Committed to 
active branches.

Dave
--
John David Anglin       dave.ang...@bell.net


2015-05-27  John David Anglin  <dang...@gcc.gnu.org>

        PR target/66148
        * config/pa/pa.c (pa_emit_move_sequence): Correct placement of
        REG_EQUAL note when doing insert.

Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c      (revision 223644)
+++ config/pa/pa.c      (working copy)
@@ -2248,11 +2248,11 @@
                                          gen_rtx_HIGH (mode, operand1)));
                  emit_move_insn (temp, gen_rtx_LO_SUM (mode, temp, operand1));
                  if (mode == DImode)
-                   emit_insn (gen_insvdi (operand0, GEN_INT (32),
-                                          const0_rtx, temp));
+                   insn = emit_insn (gen_insvdi (operand0, GEN_INT (32),
+                                                 const0_rtx, temp));
                  else
-                   emit_insn (gen_insvsi (operand0, GEN_INT (32),
-                                          const0_rtx, temp));
+                   insn = emit_insn (gen_insvsi (operand0, GEN_INT (32),
+                                                 const0_rtx, temp));
                }
              else
                {
@@ -2274,11 +2274,15 @@
                        }
 
                      if (mode == DImode)
-                       emit_insn (gen_insvdi (operand0, GEN_INT (len),
-                                              GEN_INT (pos), GEN_INT (v5)));
+                       insn = emit_insn (gen_insvdi (operand0,
+                                                     GEN_INT (len),
+                                                     GEN_INT (pos),
+                                                     GEN_INT (v5)));
                      else
-                       emit_insn (gen_insvsi (operand0, GEN_INT (len),
-                                              GEN_INT (pos), GEN_INT (v5)));
+                       insn = emit_insn (gen_insvsi (operand0,
+                                                     GEN_INT (len),
+                                                     GEN_INT (pos),
+                                                     GEN_INT (v5)));
 
                      len = pos > 0 && pos < 5 ? pos : 5;
                      pos -= len;

Reply via email to