[PATCH] D119289: [Clang] Add lowering for _C complex arithmetic to complex intrinsics.

Joshua Cranmer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 8 14:18:53 PST 2022


jcranmer-intel created this revision.
Herald added subscribers: dexonsmith, dang, pengfei.
jcranmer-intel requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This adds a new guard flag, -fuse-complex-intrinsics, that is defaulted to on
for the x86/x86-64 platforms, as they can be lowered to complex intrinsics
through the entire pipeline correctly. Other platforms could be added, but it
requires auditing their support correctly in the backend, and I don't have as
much familiarity with their ABIs as I do for x86/x86-64. Help would be
appreciated.

Future patches will build on top of this support to enable more complex limited
range support, but only when lowering to intrinsics.

Depends on D119288 <https://reviews.llvm.org/D119288>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119289

Files:
  clang/include/clang/Basic/CodeGenOptions.def
  clang/include/clang/Basic/FPOptions.def
  clang/include/clang/Basic/LangOptions.def
  clang/include/clang/Basic/LangOptions.h
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/CGExprComplex.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/CodeGen/complex-intrinsics.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119289.406974.patch
Type: text/x-patch
Size: 14596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220208/33dd7083/attachment-0001.bin>


More information about the cfe-commits mailing list