[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -238,3 +238,17 @@ // RUN: %clang -### -fno-unsafe-math-optimizations -funsafe-math-optimizations \ // RUN: -ffp-contract=off -c %s 2>&1 | FileCheck --check-prefix=CHECK-FPC-OFF %s +// RUN: %clang -### -funsafe-math-optimizations -ffp-contract=off -c %s 2>&1 \

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-10 Thread Andy Kaylor via cfe-commits
@@ -238,3 +238,17 @@ // RUN: %clang -### -fno-unsafe-math-optimizations -funsafe-math-optimizations \ // RUN: -ffp-contract=off -c %s 2>&1 | FileCheck --check-prefix=CHECK-FPC-OFF %s +// RUN: %clang -### -funsafe-math-optimizations -ffp-contract=off -c %s 2>&1 \

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -238,3 +238,17 @@ // RUN: %clang -### -fno-unsafe-math-optimizations -funsafe-math-optimizations \ // RUN: -ffp-contract=off -c %s 2>&1 | FileCheck --check-prefix=CHECK-FPC-OFF %s +// RUN: %clang -### -funsafe-math-optimizations -ffp-contract=off -c %s 2>&1 \

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -2751,6 +2751,7 @@ static void RenderFloatingPointOptions(const ToolChain , const Driver , // If one wasn't given by the user, don't pass it here. StringRef FPContract; StringRef LastSeenFfpContractOption; + StringRef LastFpContractOverrideOption;

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -238,3 +238,17 @@ // RUN: %clang -### -fno-unsafe-math-optimizations -funsafe-math-optimizations \ // RUN: -ffp-contract=off -c %s 2>&1 | FileCheck --check-prefix=CHECK-FPC-OFF %s +// RUN: %clang -### -funsafe-math-optimizations -ffp-contract=off -c %s 2>&1 \

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-07 Thread Andy Kaylor via cfe-commits
@@ -2893,7 +2915,6 @@ static void RenderFloatingPointOptions(const ToolChain , const Driver , AssociativeMath = false; ReciprocalMath = false; SignedZeros = true; - FPContract = "on"; andykaylor wrote: It was unnecessary. Only one of

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-07 Thread Zahira Ammarguellat via cfe-commits
@@ -2893,7 +2915,6 @@ static void RenderFloatingPointOptions(const ToolChain , const Driver , AssociativeMath = false; ReciprocalMath = false; SignedZeros = true; - FPContract = "on"; zahiraam wrote: Not quite sure why this is removed

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This change refactors the fp-contract handling in RenderFloatingPointOptions in the clang driver code and fixes some inconsistencies in the way warnings are reported for changes in the fp-contract behavior.

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Andy Kaylor (andykaylor) Changes This change refactors the fp-contract handling in RenderFloatingPointOptions in the clang driver code and fixes some inconsistencies in the way warnings are reported for changes in the fp-contract

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-06 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/91271 This change refactors the fp-contract handling in RenderFloatingPointOptions in the clang driver code and fixes some inconsistencies in the way warnings are reported for changes in the fp-contract behavior.