[PATCH] D142482: [CodeGen][ARM][AArch64] Support complex additions with no rotation

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 10:07:13 PST 2023


dmgreen added a comment.

Sounds like a nice idea. It might be better not to represent it as "complex rotate with zero rotation", but as a binary operation that is applied equally to both real and imaginary values. Possibly a new ComplexDeinterleavingOperation type? It could then apply to any binary operator, so if you have `R=fsub(a,b)` and `I=fsub(c,d)`, and it is valid to transform with identifyNode(a,c) and identifyNode(b,d), then it is valid to use a fsub on the interleaved version. It could run at the end of ComplexDeinterleavingGraph::identifyNode - if we haven't found anything else so far and the operations are equal binary operators then try and recurse into the operands. There are some unary operations too that might apply, like fneg and llvm.fabs intrinsics. I'm not sure how many of them commonly come up with complex numbers, but hopefully once some are added the others can be fairly simple additions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142482



More information about the llvm-commits mailing list