summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Monakov <amonakov@ispras.ru>2023-05-17 21:35:54 +0300
committerAlexander Monakov <amonakov@ispras.ru>2023-05-17 21:42:14 +0300
commitf289749578d114b6fe71f62eaef05d63138d05e0 (patch)
tree4091c3ef631905f2a45b1601ad3a3f6e9b7680bf
parent3da8f61fe2b2cff66e37b972ca5da462a0841c29 (diff)
downloadgcc-f289749578d114b6fe71f62eaef05d63138d05e0.tar.gz
tree-ssa-math-opts: correct -ffp-contract= check
Since tree-ssa-math-opts may freely contract across statement boundaries we should enable it only for -ffp-contract=fast instead of disabling it for -ffp-contract=off. No functional change, since -ffp-contract=on is not exposed yet. gcc/ChangeLog: * tree-ssa-math-opts.cc (convert_mult_to_fma): Enable only for FP_CONTRACT_FAST (no functional change).
-rw-r--r--gcc/tree-ssa-math-opts.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-math-opts.cc b/gcc/tree-ssa-math-opts.cc
index b58a2ac9e6a..d71c51dc0ea 100644
--- a/gcc/tree-ssa-math-opts.cc
+++ b/gcc/tree-ssa-math-opts.cc
@@ -3320,7 +3320,7 @@ convert_mult_to_fma (gimple *mul_stmt, tree op1, tree op2,
imm_use_iterator imm_iter;
if (FLOAT_TYPE_P (type)
- && flag_fp_contract_mode == FP_CONTRACT_OFF)
+ && flag_fp_contract_mode != FP_CONTRACT_FAST)
return false;
/* We don't want to do bitfield reduction ops. */