patch for HJ's alpha isinff problem
Richard Henderson
rth@cygnus.com
Mon Feb 16 15:58:00 GMT 1998
> > int isinff(float x)
> > {
> > int32_t ix,t;
> > ieee_float_shape_type gf_u;
> > gf_u.value = x;
> > ix = gf_u.word;
> > if (ix == 0)
[...]
> > stt $f16,16($30)
> > ldq $4,16($30)
> > addl $4,$31,$1
> > bis $1,$1,$9
This is clearly bad code, since values are stored in floating point
registers in DFmode format, an SFmode store is required to get it
out again. The bit pattern placed in $1 bears no resemblance to the
SFmode value that was desired.
The problem is that combine is not obeying CLASS_CANNOT_CHANGE_SIZE.
Here is a patch that fixes what is exposed by HJ's test case, though
I am sure there are other places that are still broken. The patch
is against egcs current, but it applies correctly to 2.8.1 with a
little fuzz.
There is a small optimization in reload that could be made that is
exposed by this patch, in that it generates
ldl $2,15($30)
addl $2,$31,$1
The sign extend is of course redundant. We ought to teach reload
to look for a sign-extending load pattern, but I don't attempt that
here.
r~
More information about the Gcc
mailing list