[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

Kevin P. Neal via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 6 12:05:55 PDT 2020


kpn created this revision.
kpn added reviewers: sepavloff, mibintc, rjmccall.
kpn added a project: clang.
Herald added subscribers: llvm-commits, cfe-commits.
Herald added a project: LLVM.
kpn requested review of this revision.

The strictfp metadata was added to the casting AST nodes in D85960 <https://reviews.llvm.org/D85960>, but we aren't using that metadata yet. This patch adds that support.

In order to avoid lots of ad-hoc passing around of the strictfp bits I updated the IRBuilder when moving from a function that has the Expr* to a function that lacks it. I believe we should switch to this pattern to keep the strictfp support from being overly invasive.

For the purpose of testing that we're picking up the right metadata, I also made my tests use a pragma to make the AST's strictfp metadata not match the global strictfp metadata. This exposes issues that we need to deal with in subsequent patches, and I believe this is the right method for most all of our clang strictfp tests.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88913

Files:
  clang/lib/CodeGen/CGExpr.cpp
  clang/lib/CodeGen/CGExprScalar.cpp
  clang/lib/CodeGen/CodeGenFunction.cpp
  clang/lib/CodeGen/CodeGenFunction.h
  clang/lib/Sema/SemaExpr.cpp
  clang/test/CodeGen/aarch64-v8.2a-neon-intrinsics-constrained.c
  clang/test/CodeGen/builtin_float_strictfp.c
  clang/test/CodeGen/complex-math-strictfp.c
  clang/test/CodeGen/complex-strictfp.c
  clang/test/CodeGen/constrained-math-builtins.c
  clang/test/CodeGen/exprs-strictfp.c
  clang/test/CodeGen/fp16-ops-strictfp.c
  clang/test/CodeGen/incdec-strictfp.c
  clang/test/CodeGen/ubsan-conditional-strictfp.c
  clang/test/CodeGen/zvector-strictfp.c
  llvm/include/llvm/IR/IRBuilder.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88913.296512.patch
Type: text/x-patch
Size: 163666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201006/1f67281c/attachment-0001.bin>


More information about the cfe-commits mailing list