raeburn@ATHENA.MIT.EDU (Ken Raeburn) (01/15/89)
It appears that gcc doesn't optimize the following code as much as it
could in some cases:
void foo (n) int *n; {
int y;
y = 0;
y op= frep ();
*n = y;
}
where "op" is "*", "&", or "|"... it zeros a register (one which has
to be preserved around the function call) and uses it. It does
properly fold things for "+" though.
I haven't checked with other identity or zero elements for other
operations (such as ~0 for '&' and '|').
I'm using version 1.32 on the vax, with optimization and
-fstrength-reduce and -fcombine-regs, though the same result is
produced with the two -f options turned off.
-- Ken