grokfield miscompiled with -O9
Richard Henderson
rth@cygnus.com
Sat Jan 8 12:31:00 GMT 2000
On Sat, Jan 08, 2000 at 05:52:22PM -0200, Alexandre Oliva wrote:
> It turned out that expand_compound_operation would disregard the
> zero_extend because reg_nonzero_bits[28] said only its two
> least-significant bits could be zero...
This makes the compiler produce correct results.
But I don't understand the intent of the code I've killed, particularly
in context of the other places this function is called. It may be that
this code is correct, but that set_nonzero_bits_and_sign_copies shouldn't
be using expand_field_assignment.
Can someone more familiar with this code lend an eye? This is real
antique stuff -- mid 1991 according to Cygnus' cvs annotate...
r~
Index: combine.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/combine.c,v
retrieving revision 1.107
diff -c -p -d -r1.107 combine.c
*** combine.c 2000/01/04 08:01:42 1.107
--- combine.c 2000/01/08 20:18:57
*************** expand_field_assignment (x)
*** 5653,5660 ****
--- 5653,5665 ----
}
}
+ #if 0
/* A SUBREG between two modes that occupy the same numbers of words
can be done by moving the SUBREG to the source. */
+ /* ??? No it can't. Or at least not when called from
+ set_nonzero_bits_and_sign_copies, since we lose the fact that
+ the upper bits of an assignment into a non-paradoxical subreg
+ are now undefined. */
else if (GET_CODE (SET_DEST (x)) == SUBREG
&& (((GET_MODE_SIZE (GET_MODE (SET_DEST (x)))
+ (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)
*************** expand_field_assignment (x)
*** 5667,5672 ****
--- 5672,5678 ----
SET_SRC (x)));
continue;
}
+ #endif
else
break;
More information about the Gcc-bugs
mailing list