aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2023-03-12 18:40:50 +0000
committerTamar Christina <tamar.christina@arm.com>2023-03-12 18:40:50 +0000
commit0b3c630fcc44063a61f6131af48a4171b1de2b37 (patch)
treeb3033ac2f983291900c22964bfc11f10d12635ac /libgcc
parent03c6ba86757f0684c5419c90651106900f5ecb5a (diff)
downloadgcc-0b3c630fcc44063a61f6131af48a4171b1de2b37.zip
gcc-0b3c630fcc44063a61f6131af48a4171b1de2b37.tar.gz
gcc-0b3c630fcc44063a61f6131af48a4171b1de2b37.tar.bz2
middle-end: don't form FMAs when multiplication is not single use. [PR108583]
The testcase typedef unsigned int vec __attribute__((vector_size(32))); vec f3 (vec a, vec b, vec c) { vec d = a * b; return d + ((c + d) >> 1); } shows a case where we don't want to form an FMA due to the MUL not being single use. In this case to form an FMA we have to redo the MUL as well as we no longer have it to share. As such making an FMA here would be a de-optimization. gcc/ChangeLog: PR target/108583 * tree-ssa-math-opts.cc (convert_mult_to_fma): Inhibit FMA in case not single use. gcc/testsuite/ChangeLog: PR target/108583 * gcc.dg/mla_1.c: New test. Co-Authored-By: Richard Sandiford <richard.sandiford@arm.com>
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions