[PATCH] D80952: [FPEnv][Clang][Driver][WIP] Disable constrained floating point on targets lacking support.

Kevin P. Neal via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 1 14:05:50 PDT 2020


kpn created this revision.
kpn added reviewers: cameron.mcinally, craig.topper, andrew.w.kaylor, spatel, wristow, nemanjai.
Herald added subscribers: cfe-commits, arphaman.
Herald added a project: clang.
kpn added a comment.

This currently triggers a failure in test "Clang :: Misc/warning-flags.c". Suggestions on how to fix that correctly are welcome.


We currently have strict floating point/constrained floating point enabled for all targets. Constrained SDAG nodes get converted to the regular ones before reaching the target layer. In theory this should be fine.

However, the changes are exposed to users through multiple clang options already in use in the field, and the changes are _completely_ _untested_ on almost all of our targets. Bugs have already been found, like "https://bugs.llvm.org/show_bug.cgi?id=45274".

This patch disables constrained floating point options in clang everywhere except X86 and SystemZ. A warning will be printed when this happens.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80952

Files:
  clang/include/clang/Basic/DiagnosticFrontendKinds.td
  clang/include/clang/Basic/TargetInfo.h
  clang/lib/Basic/TargetInfo.cpp
  clang/lib/Basic/Targets/SystemZ.h
  clang/lib/Basic/Targets/X86.h
  clang/lib/Frontend/CompilerInstance.cpp
  clang/test/CodeGen/aarch64-neon-misc-constrained.c
  clang/test/CodeGen/aarch64-neon-scalar-x-indexed-elem-constrained.c
  clang/test/CodeGen/aarch64-v8.2a-neon-intrinsics-constrained.c
  clang/test/CodeGen/arm-neon-directed-rounding-constrained.c
  clang/test/CodeGen/arm64-vrnd-constrained.c
  clang/test/CodeGen/fp-strictfp.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80952.267718.patch
Type: text/x-patch
Size: 7545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200601/89e2adb3/attachment.bin>


More information about the cfe-commits mailing list