]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix PR 101237: Remove element_type call when used with the functions from real
authorAndrew Pinski <apinski@marvell.com>
Tue, 29 Jun 2021 03:48:44 +0000 (20:48 -0700)
committerAndrew Pinski <apinski@marvell.com>
Mon, 5 Jul 2021 19:44:13 +0000 (12:44 -0700)
commit3c44b412fec8d5ab7fc064065414314a8ae05c87
tree061137ae4cafb6d5e41cdf627b1fffd6501f655a
parent3b5e8ee4f1ecc6d407f391695f65960bcbd63cff
Fix PR 101237: Remove element_type call when used with the functions from real

HONOR_SIGNED_ZEROS, HONOR_SIGN_DEPENDENT_ROUNDING, and HONOR_SNANS all
have an overload for taking a tree type now, so we should do that instead.

OK?  Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

PR middle-end/101237
* fold-const.c (negate_expr_p): Remove call to element_mode
and TREE_MODE/TREE_TYPE when calling HONOR_SIGNED_ZEROS,
HONOR_SIGN_DEPENDENT_ROUNDING, and HONOR_SNANS.
(fold_negate_expr_1): Likewise.
(const_unop): Likewise.
(fold_cond_expr_with_comparison): Likewise.
(fold_binary_loc): Likewise.
(fold_ternary_loc): Likewise.
(tree_call_nonnegative_warnv_p): Likewise.
* match.pd (-(A + B) -> (-B) - A): Likewise.
gcc/fold-const.c
gcc/match.pd