[PATCH] D114174: [ARM][CodeGen] Add support for complex addition and multiplication

Nicholas Guy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 06:55:01 PDT 2022


NickGuy updated this revision to Diff 416915.
NickGuy edited the summary of this revision.
NickGuy added a comment.
Herald added a project: All.

It's been longer than I would've liked before I've gotten back to this, but I've;

- Added support for matching partial complex multiplication patterns, where a complex number is multiplied by either the real or imaginary component.
- Moved the lowering process from TTI to TLI.
- Minimised the amount of data passed to the TLI, to only expose what is needed (and not implementation details).

I had also experimented with the idea of taking a case where complex numbers are multiplied by real numbers, but the
performance overhead of expanding the real number vector to match the expected pattern of our complex instructions (`<a, _, b, _, c, _, ...>`)
caused any gains to be marginal at best, and substantial regressions were seen almost across the board.

I don't intend on adding any new patterns to this patch, further patterns (and AArch64 support) will be implemented in follow-up patches.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114174

Files:
  llvm/include/llvm/CodeGen/ComplexArithmetic.h
  llvm/include/llvm/CodeGen/Passes.h
  llvm/include/llvm/CodeGen/TargetLowering.h
  llvm/include/llvm/InitializePasses.h
  llvm/include/llvm/Transforms/Scalar.h
  llvm/lib/CodeGen/CMakeLists.txt
  llvm/lib/CodeGen/ComplexArithmetic.cpp
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/lib/Target/ARM/ARMISelLowering.h
  llvm/lib/Target/ARM/ARMTargetMachine.cpp
  llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
  llvm/test/CodeGen/ARM/ComplexArithmetic/complex-arithmetic-f16-add.ll
  llvm/test/CodeGen/ARM/ComplexArithmetic/complex-arithmetic-f16-mul.ll
  llvm/test/CodeGen/ARM/ComplexArithmetic/complex-arithmetic-f32-add.ll
  llvm/test/CodeGen/ARM/ComplexArithmetic/complex-arithmetic-f32-mul.ll
  llvm/test/CodeGen/ARM/ComplexArithmetic/complex-arithmetic-f64-add.ll
  llvm/test/CodeGen/ARM/ComplexArithmetic/complex-arithmetic-f64-mul.ll
  llvm/test/CodeGen/ARM/ComplexArithmetic/complex-arithmetic-rotations-add.ll
  llvm/test/CodeGen/ARM/ComplexArithmetic/complex-arithmetic-rotations-mul.ll
  llvm/test/CodeGen/ARM/O3-pipeline.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114174.416915.patch
Type: text/x-patch
Size: 111288 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220321/f8c8562e/attachment-0001.bin>


More information about the llvm-commits mailing list