[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-30 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/89473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-30 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel approved this pull request. https://github.com/llvm/llvm-project/pull/89473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-30 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: LGTM! Thanks. https://github.com/llvm/llvm-project/pull/89473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-30 Thread Andy Kaylor via cfe-commits
andykaylor wrote: ping for review https://github.com/llvm/llvm-project/pull/89473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-24 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/89473 >From a137c023aaf5ccc174d347b7bda403bf15d683ae Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 24 Apr 2024 12:35:49 -0700 Subject: [PATCH] Fix -fno-unsafe-math-optimizations behavior This changes the ha

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-22 Thread Andy Kaylor via cfe-commits
andykaylor wrote: I've made extensive changes to the fast-math.c test here: https://github.com/llvm/llvm-project/pull/89687 That update isn't intended to change any existing behavior. A few things worked differently than I expected, but I left the checks consistent with the current behavior a

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-22 Thread Andy Kaylor via cfe-commits
andykaylor wrote: I've made some minor changes to clean up the LIT test checks for this PR. I started to clean up the entire test, but it quickly became obvious that I should put that into a separate PR. I will submit a new PR to clean up the entire fast-math.c test. I have an idea that I thi

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-22 Thread Zahira Ammarguellat via cfe-commits
@@ -271,30 +271,32 @@ // RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s // RUN: %clang -### -funsafe-math-optimizations -fno-reciprocal-math -c %s \ -// RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s +// RUN: 2>&1 | FileCheck --check-prefix=CH

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-22 Thread Zahira Ammarguellat via cfe-commits
@@ -318,12 +320,12 @@ // RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \ // RUN: -fno-trapping-math -ftrapping-math -c %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-NO-REASSOC-NO-UNSAFE-MATH %s +// RUN: | FileCheck --check-prefix=CHECK-N

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-22 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/89473 >From 100fc9dfb2b071877d758ce71bddeec693d986da Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 19 Apr 2024 16:35:00 -0700 Subject: [PATCH 1/2] Fix -fno-unsafe-math-optimizations behavior This changes th

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-22 Thread Andy Kaylor via cfe-commits
@@ -318,12 +320,12 @@ // RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \ // RUN: -fno-trapping-math -ftrapping-math -c %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-NO-REASSOC-NO-UNSAFE-MATH %s +// RUN: | FileCheck --check-prefix=CHECK-N

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-22 Thread Andy Kaylor via cfe-commits
@@ -318,12 +320,12 @@ // RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \ // RUN: -fno-trapping-math -ftrapping-math -c %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-NO-REASSOC-NO-UNSAFE-MATH %s +// RUN: | FileCheck --check-prefix=CHECK-N

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-22 Thread Andy Kaylor via cfe-commits
@@ -271,30 +271,32 @@ // RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s // RUN: %clang -### -funsafe-math-optimizations -fno-reciprocal-math -c %s \ -// RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s +// RUN: 2>&1 | FileCheck --check-prefix=CH

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-20 Thread Matt Arsenault via cfe-commits
@@ -271,30 +271,32 @@ // RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s // RUN: %clang -### -funsafe-math-optimizations -fno-reciprocal-math -c %s \ -// RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s +// RUN: 2>&1 | FileCheck --check-prefix=CH

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-20 Thread Matt Arsenault via cfe-commits
@@ -318,12 +320,12 @@ // RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \ // RUN: -fno-trapping-math -ftrapping-math -c %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-NO-REASSOC-NO-UNSAFE-MATH %s +// RUN: | FileCheck --check-prefix=CHECK-N

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-20 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/89473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Andy Kaylor (andykaylor) Changes This changes the handling of -fno-unsafe-fp-math to stop having that option imply -ftrapping-math. In gcc, -fno-unsafe-math-optimizations sets -ftrapping-math, but that dependency is based on the fact

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-19 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/89473 This changes the handling of -fno-unsafe-fp-math to stop having that option imply -ftrapping-math. In gcc, -fno-unsafe-math-optimizations sets -ftrapping-math, but that dependency is based on the fact the -ftra