On 9/7/26 2:54 PM, Robin Dapp wrote:
I would say we don't need to rewrite vector.md right now.

My current change mainly focuses on bug fix, and vector.md doesn't
cause this issue.

Regarding RTL consistency, I agree we should probably rewrite that in
vector.md later,
But doing it right now, I have a few concerns:
- Changing code_for_pred_mul will cause a lot of changes, as many
other places call it.
- The operand commutativity on fma will force us to create a lot of
extra define_insn patterns. That would make the code pretty ugly and
redundant.

So before rewriting vector.md to fma, maybe we should first consider
how to define proper iterators for fma, though I dont know it's easy
or not.
After that, we can do the refactoring cleanly.

What do you think?
I guess we're lucky that we haven't seen the issue so far but we could
(even though combine won't do much with it).
So IMHO this is OK as first fix if that works for Jeff as well but we
definitely need to keep vector.md in mind.
But if we install Zhongyao's patch without fixing autovec.md, then don't we run the very real risk of unrecognizable insns, particularly if someone uses the intrinsics interface to directly request those FMA insns.

I certainly understand Zhongyao's desire for a surgical fix, but I'm not sure it's actually possible in this case.  As Zongyaho notes, once we start this path I think we need to look closely at all the mul_plus and mul_minus patterns as they're going to need updating as well I suspect.

Jeff


Reply via email to