]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix (fcopysign x, NEGATIVE_CONST) -> (fneg (fabs x)) simplification [PR112483]
authorXi Ruoyao <xry111@xry111.site>
Sun, 12 Nov 2023 14:16:20 +0000 (14:16 +0000)
committerXi Ruoyao <xry111@xry111.site>
Mon, 13 Nov 2023 07:51:14 +0000 (15:51 +0800)
commit7ba7529ee3974667a8e68d089b606ac2fb159415
tree82ed38a31d4eb8af5ae281c84438531963289771
parent5a0c302d2d721b9650c1e354695dbba87364c334
Fix (fcopysign x, NEGATIVE_CONST) -> (fneg (fabs x)) simplification [PR112483]

(fcopysign x, NEGATIVE_CONST) can be simplified to (fneg (fabs x)), but
a logic error in the code caused it mistakenly simplified to (fneg x)
instead.

gcc/ChangeLog:

PR rtl-optimization/112483
* simplify-rtx.cc (simplify_binary_operation_1) <case COPYSIGN>:
Fix the simplification of (fcopysign x, NEGATIVE_CONST).
gcc/simplify-rtx.cc