[PATCH] D114174: [ARM][CodeGen] Add support for complex addition and multiplication
Nicholas Guy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 04:02:34 PDT 2022
NickGuy added a comment.
In D114174#3601236 <https://reviews.llvm.org/D114174#3601236>, @dmgreen wrote:
> What happened to the ideas of starting from a shuffle and working through a worklist of pairs of [Real, Imaginary] Values that we match to complex nodes?
While that would work "simply" enough for cases like `a * b`, more elaborate cases (e.g. `(a * b) * c`) would result in some ambiguity as to which `add(mul, mul)` pairs with which `sub(mul, mul)`. This complexity inflates further the more operands are involved. The approach I've implemented here considers each complex node in isolation (with the exception of the accumulator value).
> I presume the == 128 can be removed if we teach it how to split the vectors up?I presume the == 128 can be removed if we teach it how to split the vectors up?
Yep, vector splitting is something I decided to push out of this initial patch, and will be implemented in a follow-up. (Due to each node being treated in isolation, the vector splitting from previous iterations got overly complicated and unwieldy). The ideal solution that I can see would be to teach the intrinsic how to split, rather than the pass (somewhere like `DAGTypeLegalizer::SplitVectorResult`).
Remaining comments will be addressed in a follow-up patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114174/new/
https://reviews.llvm.org/D114174
More information about the llvm-commits
mailing list