aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-03-25 12:46:42 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-03-25 12:46:42 -0500
commitb8f4c7380a78248e3a631c1e895e73700aa9eb78 (patch)
tree40742f8540557d1d4e0fd2eba6f6867381164e3b /gcc
parent1554cdf5c916be937876b35ef5fc3c094b59a32b (diff)
downloadgcc-b8f4c7380a78248e3a631c1e895e73700aa9eb78.zip
gcc-b8f4c7380a78248e3a631c1e895e73700aa9eb78.tar.gz
gcc-b8f4c7380a78248e3a631c1e895e73700aa9eb78.tar.bz2
(reload): Fix error in last change; only check against group reloads
and check all reloads. From-SVN: r6866
Diffstat (limited to 'gcc')
-rw-r--r--gcc/reload1.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 4bbd43a..4e7a362e 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -1149,12 +1149,21 @@ reload (first, global, dumpfile)
size = CLASS_MAX_NREGS (class, mode);
/* If this class doesn't want a group determine if
- we have a nongroup need or a regular need. */
+ we have a nongroup need or a regular need. We have
+ a nongroup need if this reload conflicts with a
+ group reload whose class intersects with this reload's
+ class. */
nongroup_need = 0;
if (size == 1)
- for (j = i + 1; j < n_reloads; j++)
- if (reloads_conflict (i, j)
+ for (j = 0; j < n_reloads; j++)
+ if ((CLASS_MAX_NREGS (reload_reg_class[j],
+ (GET_MODE_SIZE (reload_outmode[i])
+ > GET_MODE_SIZE (reload_inmode[i]))
+ ? reload_outmode[i]
+ : reload_inmode[i])
+ > 1)
+ && reloads_conflict (i, j)
&& reg_classes_intersect_p (class,
reload_reg_class[j]))
{