This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe94c171ddb03: [clang][Driver] recognize `-ffp-contract=fast-honor-pragmas` (authored by yaxunl). Herald added a project: clang.
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145648/new/ https://reviews.llvm.org/D145648 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/fp-contract.c Index: clang/test/Driver/fp-contract.c =================================================================== --- clang/test/Driver/fp-contract.c +++ clang/test/Driver/fp-contract.c @@ -21,6 +21,10 @@ // RUN: %clang -### -ffast-math -ffp-contract=fast -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-FPC-FAST %s +// RUN: %clang -### -ffast-math -ffp-contract=fast-honor-pragmas -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-FPC-FAST-HONOR %s +// CHECK-FPC-FAST-HONOR: "-ffp-contract=fast-honor-pragmas" + // RUN: %clang -### -ffp-contract=fast -ffast-math -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-FPC-FAST %s // RUN: %clang -### -ffp-contract=on -ffast-math -c %s 2>&1 \ Index: clang/lib/Driver/ToolChains/Clang.cpp =================================================================== --- clang/lib/Driver/ToolChains/Clang.cpp +++ clang/lib/Driver/ToolChains/Clang.cpp @@ -2955,7 +2955,8 @@ // -ffp-model=precise sets PreciseFPModel to on and Val to // "precise". FPContract is set. ; - } else if (Val.equals("fast") || Val.equals("on") || Val.equals("off")) { + } else if (Val.equals("fast") || Val.equals("on") || Val.equals("off") || + Val.equals("fast-honor-pragmas")) { FPContract = Val; LastSeenFfpContractOption = Val; } else
Index: clang/test/Driver/fp-contract.c =================================================================== --- clang/test/Driver/fp-contract.c +++ clang/test/Driver/fp-contract.c @@ -21,6 +21,10 @@ // RUN: %clang -### -ffast-math -ffp-contract=fast -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-FPC-FAST %s +// RUN: %clang -### -ffast-math -ffp-contract=fast-honor-pragmas -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-FPC-FAST-HONOR %s +// CHECK-FPC-FAST-HONOR: "-ffp-contract=fast-honor-pragmas" + // RUN: %clang -### -ffp-contract=fast -ffast-math -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-FPC-FAST %s // RUN: %clang -### -ffp-contract=on -ffast-math -c %s 2>&1 \ Index: clang/lib/Driver/ToolChains/Clang.cpp =================================================================== --- clang/lib/Driver/ToolChains/Clang.cpp +++ clang/lib/Driver/ToolChains/Clang.cpp @@ -2955,7 +2955,8 @@ // -ffp-model=precise sets PreciseFPModel to on and Val to // "precise". FPContract is set. ; - } else if (Val.equals("fast") || Val.equals("on") || Val.equals("off")) { + } else if (Val.equals("fast") || Val.equals("on") || Val.equals("off") || + Val.equals("fast-honor-pragmas")) { FPContract = Val; LastSeenFfpContractOption = Val; } else
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits