Skip to content
Snippets Groups Projects
Commit cbd2a10d authored by Haijian Zhang's avatar Haijian Zhang Committed by Richard Biener
Browse files

rtl combine should consider NaNs when generate fp min/max [PR94708]

    As discussed on PR94708, it's unsafe for rtl combine to generate fp
    min/max under -funsafe-math-optimizations, considering NaNs. In
    addition to flag_unsafe_math_optimizations check, we also need to
    do extra mode feature testing here: && !HONOR_NANS (mode)
    && !HONOR_SIGNED_ZEROS (mode)

    2020-04-24  Haijian Zhang <z.zhanghaijian@huawei.com>

    gcc/
	PR rtl-optimization/94708
	* combine.c (simplify_if_then_else): Add check for
	!HONOR_NANS (mode) && !HONOR_SIGNED_ZEROS (mode).
    gcc/testsuite/
	PR fortran/94708
	* gfortran.dg/pr94708.f90: New test.
parent 6f6c7992
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment