[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-21 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/85862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-21 Thread Simon Pilgrim via cfe-commits
@@ -207,6 +207,8 @@ _mm256_div_ps(__m256 __a, __m256 __b) /// Compares two 256-bit vectors of [4 x double] and returns the greater ///of each pair of values. /// +///If either value in a comparison is NaN, returns the value from \a __b. RKSimon wrote:

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-20 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/85862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-20 Thread Paul T Robinson via cfe-commits
@@ -513,7 +526,7 @@ static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_cmpge_pd(__m128d __a, ///operand are ordered with respect to those in the second operand. /// ///A pair of double-precision values are "ordered" with respect to each pogo59 wrote:

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-20 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/85862 >From 5ed257ea248a5868cd3190bd1ad89413a1606370 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Tue, 19 Mar 2024 13:20:14 -0700 Subject: [PATCH 1/2] [X86][Headers] Specify result of NaN comparisons Make sure

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-20 Thread Paul T Robinson via cfe-commits
@@ -710,6 +728,7 @@ _mm_cmpge_ps(__m128 __a, __m128 __b) /// ///The comparison yields 0x0 for false, 0x for true, in the ///low-order bits of a vector of [4 x float]. +///If either value in a comparison is NaN, returns false. pogo59 wrote:

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-20 Thread Paul T Robinson via cfe-commits
@@ -1168,8 +1202,8 @@ _mm_comige_ss(__m128 __a, __m128 __b) ///operands to determine if the first operand is not equal to the second ///operand. /// -///The comparison returns 0 for false, 1 for true. If either of the two -///lower floating-point values is NaN,

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-20 Thread Paul T Robinson via cfe-commits
@@ -207,6 +207,8 @@ _mm256_div_ps(__m256 __a, __m256 __b) /// Compares two 256-bit vectors of [4 x double] and returns the greater ///of each pair of values. /// +///If either value in a comparison is NaN, returns the value from \a __b. pogo59 wrote:

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-20 Thread Paul T Robinson via cfe-commits
@@ -4743,7 +4771,9 @@ static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_castsi128_pd(__m128i __a) { ///128-bit vectors of [2 x double], using the operation specified by the ///immediate integer operand. /// -///Each comparison yields 0x0 for false,

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-20 Thread via cfe-commits
https://github.com/craigflores approved this pull request. This looks okay, but please consider my comments. https://github.com/llvm/llvm-project/pull/85862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-20 Thread via cfe-commits
@@ -513,7 +526,7 @@ static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_cmpge_pd(__m128d __a, ///operand are ordered with respect to those in the second operand. /// ///A pair of double-precision values are "ordered" with respect to each craigflores

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-20 Thread via cfe-commits
https://github.com/craigflores edited https://github.com/llvm/llvm-project/pull/85862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-20 Thread via cfe-commits
https://github.com/craigflores edited https://github.com/llvm/llvm-project/pull/85862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-20 Thread via cfe-commits
@@ -4743,7 +4771,9 @@ static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_castsi128_pd(__m128i __a) { ///128-bit vectors of [2 x double], using the operation specified by the ///immediate integer operand. /// -///Each comparison yields 0x0 for false,

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-19 Thread Phoebe Wang via cfe-commits
@@ -207,6 +207,8 @@ _mm256_div_ps(__m256 __a, __m256 __b) /// Compares two 256-bit vectors of [4 x double] and returns the greater ///of each pair of values. /// +///If either value in a comparison is NaN, returns the value from \a __b. phoebewang

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-19 Thread Paul T Robinson via cfe-commits
pogo59 wrote: cc @craigflores I have resisted the temptation to do a general editorial pass over these headers. This patch is "functional" in that it (mostly) adds information that was not provided before. There's a lot that could be done to make the descriptions more consistent with each

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Paul T Robinson (pogo59) Changes Make sure all float/double comparison intrinsics specify what happens with a NaN input. Update some existing descriptions of comparison results to make them all consistent. Also replace "yields"

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-19 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 created https://github.com/llvm/llvm-project/pull/85862 Make sure all float/double comparison intrinsics specify what happens with a NaN input. Update some existing descriptions of comparison results to make them all consistent. Also replace "yields" with "returns"