On Sun, Sep 6, 2026 at 10:31 PM Jeff Law <[email protected]> wrote: > Thanks for digging into this. Per a discussion with Robin last week, using > the FMA opcode seems like the right thing to do. My question is do we need a > similar change in vector.md? > > ;; > ------------------------------------------------------------------------------- > ;; ---- Predicated floating-point ternary operations > ;; > ------------------------------------------------------------------------------- > ;; Includes: > ;; - 13.6 Vector Single-Width Floating-Point Fused Multiply-Add Instructions > ;; > ------------------------------------------------------------------------------- > > After which we have the same kind of RTL structure you're fixing in > autovec.md and autovec-opt.md. > > Jeff >
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? -- Regards, Zhongyao
