[Bug target/69614] [6 Regression] wrong code with -Os -fno-expensive-optimizations -fschedule-insns -mtpcs-leaf-frame -fira-algorithm=priority @ armv7a

bernds at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 11 18:55:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69614

--- Comment #20 from Bernd Schmidt <bernds at gcc dot gnu.org> ---
So this:

@@ -5890,11 +5897,24 @@ remove_inheritance_pseudos (bitmap remov
            continue;
          done_p = false;
          sregno = dregno = -1;
-         if (change_p && NONDEBUG_INSN_P (curr_insn)
-             && (set = single_set (curr_insn)) != NULL_RTX)
+         if (change_p && NONDEBUG_INSN_P (curr_insn))
            {
-             dregno = get_regno (SET_DEST (set));
-             sregno = get_regno (SET_SRC (set));
+             set = single_set (curr_insn);
+             if (set != NULL_RTX)
+               {
+                 dregno = get_regno (SET_DEST (set));
+                 sregno = get_regno (SET_SRC (set));
+               }
+             else if (GET_CODE (PATTERN (curr_insn)) == USE
+                      || GET_CODE (PATTERN (curr_insn)) == CLOBBER)
+               {
+                 dregno = get_regno (XEXP (PATTERN (curr_insn), 0));
+                 if (bitmap_bit_p (remove_pseudos, dregno))
+                   {
+                     lra_set_insn_deleted (curr_insn);
+                     done_p = true;
+                   }
+               }
            }

          if (sregno >= 0 && dregno >= 0)

gets rid of the extra clobbers but doesn't change code generation. So the
problem is likely elsewhere.


More information about the Gcc-bugs mailing list