[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-11-28 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-11-28 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam approved this pull request. https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-11-28 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: LGTM. https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-11-28 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. LGTM. Thanks https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-11-28 Thread Matt Arsenault via cfe-commits
arsenm wrote: ping https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-11-13 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/68267 >From f09d8efdcbb5ffb9cd39d686205a120b6a82a01b Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Thu, 31 Aug 2023 17:33:35 -0400 Subject: [PATCH] clang: Add pragma clang fp reciprocal Just follow along with the

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-11-09 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,130 @@ +// RUN: %clang_cc1 -O3 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck -check-prefixes=CHECK,DEFAULT %s +// RUN: %clang_cc1 -O3 -triple %itanium_abi_triple -freciprocal-math -emit-llvm -o - %s | FileCheck -check-prefixes=CHECK,FLAG %s + +float base(

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-11-08 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-11-03 Thread Yaxun Liu via cfe-commits
@@ -0,0 +1,130 @@ +// RUN: %clang_cc1 -O3 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck -check-prefixes=CHECK,DEFAULT %s +// RUN: %clang_cc1 -O3 -triple %itanium_abi_triple -freciprocal-math -emit-llvm -o - %s | FileCheck -check-prefixes=CHECK,FLAG %s + +float base(

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-11-03 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > Just follow allow with the reassociate pragma. What does that mean? https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-11-03 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 8e2b3309a975748649a504620a9600da9fe3c837 db9b84992dbd6d75dc5c23b11d63c195400d5bc1 --

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-11-03 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/68267 >From db9b84992dbd6d75dc5c23b11d63c195400d5bc1 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Thu, 31 Aug 2023 17:33:35 -0400 Subject: [PATCH] clang: Add pragma clang fp reciprocal Just follow allow with the

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-11-02 Thread Matt Arsenault via cfe-commits
arsenm wrote: > Can you please fix the description of the patch. Fix what about it? https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-11-02 Thread Matt Arsenault via cfe-commits
arsenm wrote: Added the string to the message. It's covered by the existing test https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-10-06 Thread Andy Kaylor via cfe-commits
@@ -1309,6 +1309,13 @@ void Sema::ActOnPragmaFPReassociate(SourceLocation Loc, bool IsEnabled) { CurFPFeatures = NewFPFeatures.applyOverrides(getLangOpts()); } +void Sema::ActOnPragmaFPReciprocal(SourceLocation Loc, bool IsEnabled) { andykaylor wrote: Ther

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-10-06 Thread Matt Arsenault via cfe-commits
@@ -1309,6 +1309,13 @@ void Sema::ActOnPragmaFPReassociate(SourceLocation Loc, bool IsEnabled) { CurFPFeatures = NewFPFeatures.applyOverrides(getLangOpts()); } +void Sema::ActOnPragmaFPReciprocal(SourceLocation Loc, bool IsEnabled) { arsenm wrote: Why does

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-10-06 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: Can you please fix the description of the patch. Please note that Melanie has retired. You can add me as a reviewer for all FP related work. Thanks. https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commi

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-10-06 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: and a test for it. https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-10-06 Thread Andy Kaylor via cfe-commits
andykaylor wrote: err_pragma_fp_invalid_option needs to be updated to add 'reciprocal' https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-10-06 Thread Andy Kaylor via cfe-commits
@@ -1309,6 +1309,13 @@ void Sema::ActOnPragmaFPReassociate(SourceLocation Loc, bool IsEnabled) { CurFPFeatures = NewFPFeatures.applyOverrides(getLangOpts()); } +void Sema::ActOnPragmaFPReciprocal(SourceLocation Loc, bool IsEnabled) { andykaylor wrote: This

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-10-06 Thread Andy Kaylor via cfe-commits
@@ -4609,6 +4609,22 @@ The pragma can take two values: ``on`` and ``off``. float v = t + z; } +``#pragma clang fp reciprocal`` allows control over using reciprocal +approximations in floating point expressions. When enabled, this +pragma allows the expression ``x / y`` t

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-10-06 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: Thanks for adding this! I have just a few minor comments. https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-10-06 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-10-05 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/68267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-10-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes Just follow allow with the reassociate pragma. This allows locally setting the arcp fast math flag. Previously you could only access this through the global -freciprocal-math. --- Full diff: https://github.com/llvm/llvm-project/pull/68267

[clang] clang: Add pragma clang fp reciprocal (PR #68267)

2023-10-04 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/68267 Just follow allow with the reassociate pragma. This allows locally setting the arcp fast math flag. Previously you could only access this through the global -freciprocal-math. >From 082efa2687b0b6a250bbdbe60040c