]> git.ipfire.org Git - thirdparty/gcc.git/commit
middle-end: use destination type when folding addent [PR123897]
authorTamar Christina <tamar.christina@arm.com>
Mon, 2 Feb 2026 11:03:53 +0000 (11:03 +0000)
committerTamar Christina <tamar.christina@arm.com>
Mon, 2 Feb 2026 11:03:53 +0000 (11:03 +0000)
commit075aadae398431b23d34dfc7204e297b8676dd59
tree81ec0d3305d6b6260765cd603e995ca7ac699b26
parent2d1b0191b6bf71c12f876abea909d9a05200f406
middle-end: use destination type when folding addent [PR123897]

Previously the types of the 3 operands would always be the same when you get to
convert_mult_to_fma_1.  However now they can differ untill we fold them to be the
same.  Using the type of the final expression is thus incorrect and any
intermediate operations need to happen in the type of the expression being
folded.

gcc/ChangeLog:

PR tree-optimization/123897
* tree-ssa-math-opts.cc (convert_mult_to_fma_1): Use type of variable
being folded.

gcc/testsuite/ChangeLog:

PR tree-optimization/123897
* gcc.target/aarch64/sve/pr123897.c: New test.
gcc/testsuite/gcc.target/aarch64/sve/pr123897.c [new file with mode: 0644]
gcc/tree-ssa-math-opts.cc