diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-03-30 11:37:49 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@linaro.org> | 2017-06-07 16:10:53 +0100 |
commit | ded1da7f0aeb02583994fe1a1fa569a098bf0e98 (patch) | |
tree | 5a88bad9bfc646083573095e0f5f5f1c9e6d978f /gcc/cp/constexpr.c | |
parent | 34c63b2ac0436a04841a6e3da2a9ff7118eb269b (diff) | |
download | gcc-ded1da7f0aeb02583994fe1a1fa569a098bf0e98.tar.gz |
Replace FMA_EXPR with one internal fn per optab
There are four optabs for various forms of fused multiply-add:
fma, fms, fnma and fnms. Of these, only fma had a direct gimple
representation. For the other three we relied on special pattern-
matching during expand, although tree-ssa-math-opts.c did have
some code to try to second-guess what expand would do.
This patch removes the old FMA_EXPR representation of fma and
introduces four new internal functions, one for each optab.
IFN_FMA is tied to BUILT_IN_FMA* while the other three are
independent directly-mapped internal functions. It's then
possible to do the pattern-matching in match.pd and
tree-ssa-math-opts.c (via folding) can select the exact
FMA-based operation.
The patch removes the gimple FE support for __FMA rather than mapping
it to the internal function. There's no reason now to treat it
differently from other internal functions (although the FE doesn't
handle those yet).
The BRIG & HSA parts are a best guess, but seem relatively simple.
Diffstat (limited to 'gcc/cp/constexpr.c')
-rw-r--r-- | gcc/cp/constexpr.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 625e03c4c0a..fcd82b7b4a9 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -4375,7 +4375,6 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, non_constant_p, overflow_p); break; - case FMA_EXPR: case VEC_PERM_EXPR: r = cxx_eval_trinary_expression (ctx, t, lval, non_constant_p, overflow_p); @@ -5714,7 +5713,6 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, case ARRAY_NOTATION_REF: return false; - case FMA_EXPR: case VEC_PERM_EXPR: for (i = 0; i < 3; ++i) if (!RECUR (TREE_OPERAND (t, i), true)) |