[PATCH] D154605: Not to perform FMA bydefault

Kishan Parmar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 6 06:56:30 PDT 2023


long5hot created this revision.
long5hot added reviewers: andrew.w.kaylor, t.p.northover, kristof.beyls, john.brawn, asb, jhibbits, nemanjai.
long5hot added a project: clang.
Herald added subscribers: jdoerfert, pengfei.
Herald added a project: All.
long5hot requested review of this revision.
Herald added a subscriber: cfe-commits.

Clang frontend performs FMA bydefault based on option ffp-contract=on and fast.
It does not check if the target supports fma or not(for e.x. X86 Nehalem and core2).

Intent of this patch is to check if fma is supported or not.
for now checking on X86 only because it has +fma in target-features.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154605

Files:
  clang/include/clang/Basic/TargetInfo.h
  clang/lib/CodeGen/CGExprScalar.cpp
  clang/test/CodeGen/X86/fexcess-precision-bfloat16.c
  clang/test/CodeGen/X86/fexcess-precision.c
  clang/test/CodeGen/arithmetic-fence-builtin.c
  clang/test/CodeGen/constrained-math-builtins.c
  clang/test/CodeGen/ffp-contract-option.c
  clang/test/CodeGen/ffp-model.c
  clang/test/CodeGen/fp-contract-on-asm.c
  clang/test/CodeGen/fp-contract-pragma.cpp
  clang/test/CodeGen/fp-floatcontrol-stack.cpp
  clang/test/CodeGenOpenCL/cl20-device-side-enqueue-attributes.cl
  clang/test/CodeGenOpenCL/single-precision-constant.cl
  clang/test/PCH/pragma-floatcontrol.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154605.537696.patch
Type: text/x-patch
Size: 222624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230706/f5f8bb5f/attachment-0001.bin>


More information about the cfe-commits mailing list