r246585 - in /branches/ARM/sve-branch/gcc: Make...
rsandifo@gcc.gnu.org
rsandifo@gcc.gnu.org
Thu Mar 30 11:37:00 GMT 2017
Author: rsandifo
Date: Thu Mar 30 11:37:49 2017
New Revision: 246585
URL: https://gcc.gnu.org/viewcvs?rev=246585&root=gcc&view=rev
Log:
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.
Added:
branches/ARM/sve-branch/gcc/testsuite/gcc.dg/fma-1.c
branches/ARM/sve-branch/gcc/testsuite/gcc.dg/fma-2.c
branches/ARM/sve-branch/gcc/testsuite/gcc.dg/fma-3.c
branches/ARM/sve-branch/gcc/testsuite/gcc.dg/fma-4.c
branches/ARM/sve-branch/gcc/testsuite/gcc.dg/fma-5.c
branches/ARM/sve-branch/gcc/testsuite/gcc.dg/fma-6.c
branches/ARM/sve-branch/gcc/testsuite/gcc.dg/fma-7.c
Removed:
branches/ARM/sve-branch/gcc/testsuite/gcc.dg/gimplefe-26.c
Modified:
branches/ARM/sve-branch/gcc/Makefile.in
branches/ARM/sve-branch/gcc/brig/brigfrontend/brig-basic-inst-handler.cc
branches/ARM/sve-branch/gcc/brig/brigfrontend/brig-code-entry-handler.cc
branches/ARM/sve-branch/gcc/builtins.c
branches/ARM/sve-branch/gcc/c/gimple-parser.c
branches/ARM/sve-branch/gcc/cfgexpand.c
branches/ARM/sve-branch/gcc/cp/constexpr.c
branches/ARM/sve-branch/gcc/expr.c
branches/ARM/sve-branch/gcc/fold-const-call.c
branches/ARM/sve-branch/gcc/fold-const-call.h
branches/ARM/sve-branch/gcc/fold-const.c
branches/ARM/sve-branch/gcc/genmatch.c
branches/ARM/sve-branch/gcc/gimple-pretty-print.c
branches/ARM/sve-branch/gcc/gimple-ssa-backprop.c
branches/ARM/sve-branch/gcc/gimple.c
branches/ARM/sve-branch/gcc/gimplify.c
branches/ARM/sve-branch/gcc/hsa-gen.c
branches/ARM/sve-branch/gcc/internal-fn.c
branches/ARM/sve-branch/gcc/internal-fn.def
branches/ARM/sve-branch/gcc/match.pd
branches/ARM/sve-branch/gcc/optabs-tree.c
branches/ARM/sve-branch/gcc/testsuite/gfortran.dg/reassoc_10.f
branches/ARM/sve-branch/gcc/testsuite/gfortran.dg/reassoc_7.f
branches/ARM/sve-branch/gcc/testsuite/gfortran.dg/reassoc_8.f
branches/ARM/sve-branch/gcc/testsuite/gfortran.dg/reassoc_9.f
branches/ARM/sve-branch/gcc/testsuite/lib/target-supports.exp
branches/ARM/sve-branch/gcc/tree-cfg.c
branches/ARM/sve-branch/gcc/tree-eh.c
branches/ARM/sve-branch/gcc/tree-inline.c
branches/ARM/sve-branch/gcc/tree-pretty-print.c
branches/ARM/sve-branch/gcc/tree-ssa-loop-im.c
branches/ARM/sve-branch/gcc/tree-ssa-math-opts.c
branches/ARM/sve-branch/gcc/tree-ssa-operands.c
branches/ARM/sve-branch/gcc/tree.c
branches/ARM/sve-branch/gcc/tree.def
More information about the Gcc-cvs
mailing list