combine.c (can_combine_p): Don't combine with an asm whose output is a hard register.
authorRichard Henderson <rth@cygnus.com>
Thu, 16 Oct 1997 22:06:43 +0000 (15:06 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 16 Oct 1997 22:06:43 +0000 (15:06 -0700)
        * combine.c (can_combine_p): Don't combine with an asm whose
        output is a hard register.

From-SVN: r15940

gcc/ChangeLog
gcc/combine.c

index 32a32398db6552c23a20870f91acbbfcacc69e14..fb1218fac04dc345b590870cdc72344412731e9b 100644 (file)
@@ -1,3 +1,8 @@
+Thu Oct 16 15:07:51 1997  Richard Henderson  <rth@cygnus.com>
+
+       * combine.c (can_combine_p): Don't combine with an asm whose
+       output is a hard register.
+
 Thu Oct 16 15:43:26 1997  Mike Stump  (mrs@wrs.com)
 
        * c-decl.c (start_struct): Ensure that structs with forward
index 2ef88c09f52079199a3bd02a472942c85b2bdb43..3626e48e9757dc144afb88a80fe1f5f36ac77f42 100644 (file)
@@ -1003,6 +1003,13 @@ can_combine_p (insn, i3, pred, succ, pdest, psrc)
          && p != succ && volatile_refs_p (PATTERN (p)))
        return 0;
 
+  /* If INSN is an asm, and DEST is a hard register, reject, since it has
+     to be an explicit register variable, and was chosen for a reason.  */
+
+  if (GET_CODE (src) == ASM_OPERANDS
+      && GET_CODE (dest) == REG && REGNO (dest) < FIRST_PSEUDO_REGISTER)
+    return 0;
+
   /* If there are any volatile insns between INSN and I3, reject, because
      they might affect machine state.  */