diff options
author | Richard Henderson <rth@cygnus.com> | 1997-10-16 15:06:43 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1997-10-16 15:06:43 -0700 |
commit | b79ee7eb70cf8d352424531e73fdc14398d233ab (patch) | |
tree | f7106aca95b69b471bb0493600b7fc23327305f4 /gcc/combine.c | |
parent | 5c19a35643bd0c7d5a2766a5b91f6b6b4cb7242d (diff) | |
download | gcc-b79ee7eb70cf8d352424531e73fdc14398d233ab.zip gcc-b79ee7eb70cf8d352424531e73fdc14398d233ab.tar.gz gcc-b79ee7eb70cf8d352424531e73fdc14398d233ab.tar.bz2 |
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
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 2ef88c0..3626e48 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. */ |