aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-07-30 10:59:29 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-07-30 10:59:29 +0000
commitc1b3d827832f883e0634b18c88eb2bbde335aa42 (patch)
tree74af98cf646a4ffe37dee618dc42f2a01020ce7b /gcc/tree-ssa-structalias.c
parent8c955a4b9ca99dc1557dd4547068abf7a0838c8f (diff)
downloadgcc-c1b3d827832f883e0634b18c88eb2bbde335aa42.zip
gcc-c1b3d827832f883e0634b18c88eb2bbde335aa42.tar.gz
gcc-c1b3d827832f883e0634b18c88eb2bbde335aa42.tar.bz2
Handle IFN_COND_MUL in tree-ssa-math-opts.c
This patch extends the FMA handling in tree-ssa-math-opts.c so that it can cope with conditional multiplications as well as unconditional multiplications. The addition or subtraction must then have the same condition as the multiplication (at least for now). E.g. we can currently fold: (IFN_COND_ADD cond (mul x y) z fallback) -> (IFN_COND_FMA cond x y z fallback) This patch also allows: (IFN_COND_ADD cond (IFN_COND_MUL cond x y <whatever>) z fallback) -> (IFN_COND_FMA cond x y z fallback) 2019-07-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-ssa-math-opts.c (convert_mult_to_fma): Add a mul_cond parameter. When nonnull, make sure that the addition or subtraction has the same condition. (math_opts_dom_walker::after_dom_children): Try convert_mult_to_fma for CFN_COND_MUL too. gcc/testsuite/ * gcc.dg/vect/vect-cond-arith-7.c: New test. From-SVN: r273905
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
0 files changed, 0 insertions, 0 deletions