diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-03-13 08:41:45 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2002-03-13 08:41:45 +0100 |
commit | 4061c1a39342c6dc6ff372a9e05d206acad4fac5 (patch) | |
tree | d1257f9eca533414f42e43fe6d3e0fc749d0f580 /gcc/loop.c | |
parent | 9f53e9654b86fd142c8c3e66ce843ddb9b1de0b3 (diff) | |
download | gcc-4061c1a39342c6dc6ff372a9e05d206acad4fac5.zip gcc-4061c1a39342c6dc6ff372a9e05d206acad4fac5.tar.gz gcc-4061c1a39342c6dc6ff372a9e05d206acad4fac5.tar.bz2 |
loop.c (basic_induction_var): Don't call convert_modes if mode classes are different.
* loop.c (basic_induction_var): Don't call convert_modes if mode
classes are different.
* gcc.c-torture/compile/20020309-2.c: New test.
From-SVN: r50721
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -6214,10 +6214,11 @@ basic_induction_var (loop, x, mode, dest_reg, p, inc_val, mult_val, location) case CONST: /* convert_modes aborts if we try to convert to or from CCmode, so just exclude that case. It is very unlikely that a condition code value - would be a useful iterator anyways. */ + would be a useful iterator anyways. convert_modes aborts if we try to + convert a float mode to non-float or vice versa too. */ if (loop->level == 1 - && GET_MODE_CLASS (mode) != MODE_CC - && GET_MODE_CLASS (GET_MODE (dest_reg)) != MODE_CC) + && GET_MODE_CLASS (mode) == GET_MODE_CLASS (GET_MODE (dest_reg)) + && GET_MODE_CLASS (mode) != MODE_CC) { /* Possible bug here? Perhaps we don't know the mode of X. */ *inc_val = convert_modes (GET_MODE (dest_reg), mode, x, 0); |