diff options
author | Andrew Pinski <apinski@marvell.com> | 2021-06-28 20:48:44 -0700 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2021-07-05 12:44:13 -0700 |
commit | 3c44b412fec8d5ab7fc064065414314a8ae05c87 (patch) | |
tree | 061137ae4cafb6d5e41cdf627b1fffd6501f655a /gcc/match.pd | |
parent | 3b5e8ee4f1ecc6d407f391695f65960bcbd63cff (diff) | |
download | gcc-3c44b412fec8d5ab7fc064065414314a8ae05c87.zip gcc-3c44b412fec8d5ab7fc064065414314a8ae05c87.tar.gz gcc-3c44b412fec8d5ab7fc064065414314a8ae05c87.tar.bz2 |
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.
Diffstat (limited to 'gcc/match.pd')
-rw-r--r-- | gcc/match.pd | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/match.pd b/gcc/match.pd index 8205271..4e10d54 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -1458,8 +1458,8 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) /* -(A + B) -> (-B) - A. */ (simplify (negate (plus:c @0 negate_expr_p@1)) - (if (!HONOR_SIGN_DEPENDENT_ROUNDING (element_mode (type)) - && !HONOR_SIGNED_ZEROS (element_mode (type))) + (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) + && !HONOR_SIGNED_ZEROS (type)) (minus (negate @1) @0))) /* -(A - B) -> B - A. */ |