On 12/29/2025 8:20 AM, Tamar Christina wrote:
Currently in the simplications between if-conversion and vect we rely on
match.pd to rewrite FMA into FMS if the accumulator is on a negated value.
However if if-conversion instead produces a COND_FMA then this doesn't work and
so the vectorizer can't generate a vector FMS or it's other variant.
This extends the rules to include the COND_FMA variants. Because this happens
before the vectorization the vectorizer will take care of generating the LEN
variants and as such we don't need match.pd to know about those.
The added rules are the same as the ones directly above them just changing
FMA to COND_FMA.
Bootstrapped Regtested on aarch64-none-linux-gnu,
arm-none-linux-gnueabihf, x86_64-pc-linux-gnu
-m32, -m64 and no issues.
Ok for master?
Thanks,
Tamar
gcc/ChangeLog:
PR tree-optimization/122103
* match.pd: Add COND_FMA to COND_FMS rewrite rules.
It doesn't seem like we need for "for fmas .." as there's only one
element in the list. OK with or without fixing that.
jeff