[PATCH] D142656: [SVE][codegen] Add pattern for SVE multiply-add accumulate

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 03:01:50 PST 2023


SjoerdMeijer added a comment.

First, I think the description needs some clarifications.
As I understand it, the problem description is that we would like to match/rewrite this pattern:

  add ( mul, splat_vector(C)) ->  MOV C; MAD

where C is a constant/immediate, and the result is some MOV instruction to materialise constant C followed by the MAD.

The FIXME indicates to me that current approach is not entirely the right one, but it's a bit difficult to follow all details there.
But for NEON, the MLA and MLS instructions are generated in MachineCombine, so my first question is why we can't do something similar, e.g.:

https://github.com/llvm/llvm-project/blob/5bc4e1cd3be8844c1e7947647020710016925e9e/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp#L5925


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142656/new/

https://reviews.llvm.org/D142656



More information about the llvm-commits mailing list