[all-commits] [llvm/llvm-project] 206940: [FPEnv] Use strictfp metadata in casting nodes

Kevin P. Neal via All-commits all-commits at lists.llvm.org
Fri Nov 6 08:56:38 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2069403cdf35da826937dc40453930c60d52487f
      https://github.com/llvm/llvm-project/commit/2069403cdf35da826937dc40453930c60d52487f
  Author: Kevin P. Neal <kevin.neal at sas.com>
  Date:   2020-11-06 (Fri, 06 Nov 2020)

  Changed paths:
    M clang/lib/CodeGen/CGExpr.cpp
    M clang/lib/CodeGen/CGExprComplex.cpp
    M clang/lib/CodeGen/CGExprScalar.cpp
    M clang/lib/CodeGen/CodeGenFunction.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/CodeGen/aarch64-v8.2a-neon-intrinsics-constrained.c
    A clang/test/CodeGen/builtin_float_strictfp.c
    A clang/test/CodeGen/complex-strictfp.c
    M clang/test/CodeGen/constrained-math-builtins.c
    A clang/test/CodeGen/exprs-strictfp.c
    A clang/test/CodeGen/fp16-ops-strictfp.c
    M llvm/include/llvm/IR/IRBuilder.h

  Log Message:
  -----------
  [FPEnv] Use strictfp metadata in casting nodes

The strictfp metadata was added to the casting AST nodes in 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.

Differential Revision: https://reviews.llvm.org/D88913




More information about the All-commits mailing list