public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/113965] New: [14 Regression] gcc.target/aarch64/sve/mask_struct_load_3_run.c still fails
@ 2024-02-17  5:58 pinskia at gcc dot gnu.org
  2024-02-17  5:58 ` [Bug tree-optimization/113965] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-17  5:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113965
           Summary: [14 Regression]
                    gcc.target/aarch64/sve/mask_struct_load_3_run.c still
                    fails
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64-linux-gnu

I thought this was a dup of bug mask_struct_store_4.c issue but nope,
gcc.target/aarch64/sve/mask_struct_load_3_run.c testcase still fails for me
after the fix for that.

Note I am using the trunk of qemu to run the testcase so maybe there is a bug
in qemu ...

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

* [Bug tree-optimization/113965] [14 Regression] gcc.target/aarch64/sve/mask_struct_load_3_run.c still fails
  2024-02-17  5:58 [Bug tree-optimization/113965] New: [14 Regression] gcc.target/aarch64/sve/mask_struct_load_3_run.c still fails pinskia at gcc dot gnu.org
@ 2024-02-17  5:58 ` pinskia at gcc dot gnu.org
  2024-02-17  7:10 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-17  5:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
             Blocks|                            |53947


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations

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

* [Bug tree-optimization/113965] [14 Regression] gcc.target/aarch64/sve/mask_struct_load_3_run.c still fails
  2024-02-17  5:58 [Bug tree-optimization/113965] New: [14 Regression] gcc.target/aarch64/sve/mask_struct_load_3_run.c still fails pinskia at gcc dot gnu.org
  2024-02-17  5:58 ` [Bug tree-optimization/113965] " pinskia at gcc dot gnu.org
@ 2024-02-17  7:10 ` pinskia at gcc dot gnu.org
  2024-02-17  7:35 ` [Bug testsuite/113965] gcc.target/aarch64/sve/mask_struct_load_3_run.c still fails with qemu due to _Float16 rounding error pinskia at gcc dot gnu.org
  2024-02-17  7:37 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-17  7:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Hmm, debugging this a little further, this might be a qemu issue with fp16
support ....

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

* [Bug testsuite/113965] gcc.target/aarch64/sve/mask_struct_load_3_run.c still fails with qemu due to _Float16 rounding error
  2024-02-17  5:58 [Bug tree-optimization/113965] New: [14 Regression] gcc.target/aarch64/sve/mask_struct_load_3_run.c still fails pinskia at gcc dot gnu.org
  2024-02-17  5:58 ` [Bug tree-optimization/113965] " pinskia at gcc dot gnu.org
  2024-02-17  7:10 ` pinskia at gcc dot gnu.org
@ 2024-02-17  7:35 ` pinskia at gcc dot gnu.org
  2024-02-17  7:37 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-17  7:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|tree-optimization           |testsuite
             Blocks|53947                       |
   Target Milestone|14.0                        |---
            Summary|[14 Regression]             |gcc.target/aarch64/sve/mask
                   |gcc.target/aarch64/sve/mask |_struct_load_3_run.c still
                   |_struct_load_3_run.c still  |fails with qemu due to
                   |fails                       |_Float16 rounding error

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think this might be a rounding issue with qemu and _Float16 I think.
So _Float16 has 10/11 bits of Significand precision which means it can
represent 0 - 2047 and then outside of that it will need to truncate some bits.

In the testcase the first time where we get a failure is:
i: 40
mask: 1
out[i]: 2906.000000
if_true: 2904.000000
if_false: 140.000000
expected[i]: 2904.000000

As you can see there is one bit difference at the end. I have not looked into
why not using SVE here we are able to get the correct value though.
But I can say for sure that the vectorizer is doing the correct thing in that
using "unsigned short" instead produces the exact same .optimized file out for
the function (test_f16_f16_i8_4).

So removing the regression markers and moving this to testsuite as I think this
is not an issue with the code generation.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations

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

* [Bug testsuite/113965] gcc.target/aarch64/sve/mask_struct_load_3_run.c still fails with qemu due to _Float16 rounding error
  2024-02-17  5:58 [Bug tree-optimization/113965] New: [14 Regression] gcc.target/aarch64/sve/mask_struct_load_3_run.c still fails pinskia at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-02-17  7:35 ` [Bug testsuite/113965] gcc.target/aarch64/sve/mask_struct_load_3_run.c still fails with qemu due to _Float16 rounding error pinskia at gcc dot gnu.org
@ 2024-02-17  7:37 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-17  7:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 57443
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57443&action=edit
Reduced testcase

Attached is the reduced testcase that I was using here.

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

end of thread, other threads:[~2024-02-17  7:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-17  5:58 [Bug tree-optimization/113965] New: [14 Regression] gcc.target/aarch64/sve/mask_struct_load_3_run.c still fails pinskia at gcc dot gnu.org
2024-02-17  5:58 ` [Bug tree-optimization/113965] " pinskia at gcc dot gnu.org
2024-02-17  7:10 ` pinskia at gcc dot gnu.org
2024-02-17  7:35 ` [Bug testsuite/113965] gcc.target/aarch64/sve/mask_struct_load_3_run.c still fails with qemu due to _Float16 rounding error pinskia at gcc dot gnu.org
2024-02-17  7:37 ` pinskia 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).