re PR rtl-optimization/82338 (valgrind error in inherit_in_ebb)
authorVladimir Makarov <vmakarov@redhat.com>
Fri, 29 Sep 2017 17:15:24 +0000 (17:15 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Fri, 29 Sep 2017 17:15:24 +0000 (17:15 +0000)
2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/82338
* lra-constraints.c (inherit_in_ebb): Check usage_insns check.

From-SVN: r253299

gcc/ChangeLog
gcc/lra-constraints.c

index dfabde55a1c00d36cade190b0ce3292ba3187ed4..a2eea908053684a5e96f4e915ffe9818b4094d63 100644 (file)
@@ -1,3 +1,8 @@
+2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR rtl-optimization/82338
+       * lra-constraints.c (inherit_in_ebb): Check usage_insns check.
+
 2017-09-29  Alexander Monakov  <amonakov@ispras.ru>
 
        * genmodes.c (calc_wider_mode): Suppress qsort macro.
index d90bde2817aa0b4b29e6af27a462a79424a77cb9..4734c072c96fc1f5dc8cc8f8e7fe4ff2c8b4a7c6 100644 (file)
@@ -6219,6 +6219,7 @@ inherit_in_ebb (rtx_insn *head, rtx_insn *tail)
                  && ((cheap = XEXP (cheap, 0)), true)
                  && (regno = REGNO (cheap)) >= FIRST_PSEUDO_REGISTER
                  && (hard_regno = reg_renumber[regno]) >= 0
+                 && usage_insns[regno].check == curr_usage_insns_check
                  /* If there are pending saves/restores, the
                     optimization is not worth.  */
                  && usage_insns[regno].calls_num == calls_num - 1