public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/91861] invalid vectorization of isless, islessequal, etc. (with default of -ftrapping-math)
       [not found] <bug-91861-4@http.gcc.gnu.org/bugzilla/>
@ 2024-03-14 20:49 ` pinskia at gcc dot gnu.org
  2024-03-14 20:50 ` pinskia at gcc dot gnu.org
  2024-03-18  4:15 ` mkretz at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-14 20:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91861

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
            Summary|invalid vectorization of    |invalid vectorization of
                   |isless, islessequal, etc.   |isless, islessequal, etc.
                   |                            |(with default of
                   |                            |-ftrapping-math)
   Last reconfirmed|                            |2024-03-14
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.


(insn:TI 11 21 18 2 (set (reg:V4SF 20 xmm0 [108])
        (unge:V4SF (reg:V4SF 20 xmm0 [orig:106 MEM <vector(4) float> [(float
*)&x] ] [106])
            (mem/c:V4SF (symbol_ref:DI ("y") [flags 0x2]  <var_decl
0x7f1d203efd80 y>) [1 MEM <vector(4) float> [(float *)&y]+0 S16 A128]))) 2796
{sse_maskcmpv4sf3}
     (nil))

It should have been NLT_UQ (0x15) rather than NLT_US (NLT) (0x5)

But NLT_UQ does not exist for non-VEX encoded .
From
https://www.intel.com/content/dam/develop/external/us/en/documents/319433-024-697869.pdf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/91861] invalid vectorization of isless, islessequal, etc. (with default of -ftrapping-math)
       [not found] <bug-91861-4@http.gcc.gnu.org/bugzilla/>
  2024-03-14 20:49 ` [Bug target/91861] invalid vectorization of isless, islessequal, etc. (with default of -ftrapping-math) pinskia at gcc dot gnu.org
@ 2024-03-14 20:50 ` pinskia at gcc dot gnu.org
  2024-03-18  4:15 ` mkretz at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-14 20:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91861

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 94413 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/91861] invalid vectorization of isless, islessequal, etc. (with default of -ftrapping-math)
       [not found] <bug-91861-4@http.gcc.gnu.org/bugzilla/>
  2024-03-14 20:49 ` [Bug target/91861] invalid vectorization of isless, islessequal, etc. (with default of -ftrapping-math) pinskia at gcc dot gnu.org
  2024-03-14 20:50 ` pinskia at gcc dot gnu.org
@ 2024-03-18  4:15 ` mkretz at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: mkretz at gcc dot gnu.org @ 2024-03-18  4:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91861

--- Comment #4 from Matthias Kretz (Vir) <mkretz at gcc dot gnu.org> ---
> But NLT_UQ does not exist for non-VEX encoded

Right, one needs to compare integers and check for NaN. Like noted in the
description. Also implemented in the std::experimental::simd overloads:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libstdc%2B%2B-v3/include/experimental/bits/simd_builtin.h;h=1a716f2dbb7cf3551622e2c1574b52573acf5c62;hb=HEAD#l2057
I actually noticed this bug (and the dup) when unit-testing stdx::simd,
comparing against the scalar versions of the cmath functions.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-18  4:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-91861-4@http.gcc.gnu.org/bugzilla/>
2024-03-14 20:49 ` [Bug target/91861] invalid vectorization of isless, islessequal, etc. (with default of -ftrapping-math) pinskia at gcc dot gnu.org
2024-03-14 20:50 ` pinskia at gcc dot gnu.org
2024-03-18  4:15 ` mkretz at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).