[PATCH v2, alpha]: Fix gfortran.fortran_torture/intrinsic_nearest.f90 failure

Uros Bizjak ubizjak@gmail.com
Sat Aug 22 12:11:00 GMT 2009


On 08/22/2009 12:18 AM, Richard Henderson wrote:
> On 08/21/2009 02:46 PM, Uros Bizjak wrote:
>> I wonder, if all alpha.md patterns that inherently extend SFmode to
>> DFmode are wrong for denormal operands?
>
> Yes, I think so.  I didn't realize they weren't disabled
> for IEEE mode....

OK, we hit the core of the problem - there are several patterns that 
inherently expand operands and they should be disabled in IEEE mode 
since they don't work for denormals. The specific problem was triggered 
by wrong *cmpdf_ieee_ext[123] patterns, but looking in alpha.md, in 
order to close the path for denormals, IMO we should disable 
*movdfcc_ext[1234] in the same way

(BTW: The condition from *cmpdf_internal can be removed, since the 
pattern is shadowed by *cmpdf_ieee. Just to be consistent with other 
DFmode patterns.)

2009-08-22  Uros Bizjak <ubizjak@gmail.com>

     * config/alpha/alpha.md (*cmpdf_ieee_ext[123]): Remove.
     (*cmpdf_internal): Enable for all ALPHA_FPTM levels.
     (*movdfcc_ext[1234]): Disable for IEEE mode.

Attached patch was bootstrapped and regression tested on 
alphaev68-linux-gnu.

For the record: patched compiler also fixes runtime error with original 
gfortran.dg/boz_9.f90. But without denormals, tests run several times 
faster, so let's not revert boz_9.f90 change.

OK for mainline, 4.3 and 4.4? (The patch is now strictly 
target-dependant patch.)

Uros.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: a.diff.txt
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090822/cc1662dc/attachment.txt>


More information about the Fortran mailing list