From: Richard Henderson Date: Thu, 16 Oct 1997 22:06:43 +0000 (-0700) Subject: combine.c (can_combine_p): Don't combine with an asm whose output is a hard register. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b79ee7eb70cf8d352424531e73fdc14398d233ab;p=gcc.git combine.c (can_combine_p): Don't combine with an asm whose output is a hard register. * combine.c (can_combine_p): Don't combine with an asm whose output is a hard register. From-SVN: r15940 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 32a32398db6..fb1218fac04 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu Oct 16 15:07:51 1997 Richard Henderson + + * 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 diff --git a/gcc/combine.c b/gcc/combine.c index 2ef88c09f52..3626e48e975 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -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. */