Bug 108429 - [13 Regression] FAIL: gcc.target/i386/pr89618.c scan-tree-dump vect "LOOP VECTORIZED"
Summary: [13 Regression] FAIL: gcc.target/i386/pr89618.c scan-tree-dump vect "LOOP VEC...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 13.0
: P1 normal
Target Milestone: 13.0
Assignee: Jan Hubicka
URL:
Keywords: missed-optimization, testsuite-fail
Depends on:
Blocks: vectorizer
  Show dependency treegraph
 
Reported: 2023-01-17 10:31 UTC by Richard Biener
Modified: 2023-03-14 08:48 UTC (History)
3 users (show)

See Also:
Host:
Target: x86_64-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2023-01-17 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2023-01-17 10:31:50 UTC
The testcase FAILs for me since recently.
Comment 1 Richard Biener 2023-01-17 10:33:42 UTC
/home/rguenther/src/trunk/gcc/testsuite/gcc.target/i386/pr89618.c:14:7: missed:   unsupported emulated scatter.
/home/rguenther/src/trunk/gcc/testsuite/gcc.target/i386/pr89618.c:16:14: missed:   not vectorized: relevant stmt not supported: *_26 = iftmp.0_39;

note the testcase enables -mavx512f but with generic tuning
Comment 2 Richard Biener 2023-01-17 10:36:25 UTC
We now have X86_TUNE_USE_SCATTER_[{2,4}PARTS] but the vectorizer doesn't
have support to open-code 2- or 4- part scatter so the comment that open-coded
variants are consistently faster doesn't help vectorization.
Comment 3 Jakub Jelinek 2023-01-17 10:41:49 UTC
Started with r13-5202-g967592488c64a86f37bef3dabebb56364f14acdd
Comment 4 Jan Hubicka 2023-01-17 20:09:37 UTC
I see this is scatter with generic tuning.  I actually did not intend to disable it there without more testing, so I will revert that part of change.

In meantime I noticed that aocc sometimes seems to use scatters with some degree of success even though scatters seems to be loss on all tsvc benchmarks where GCC generates them. So I think we want to do more work on this (adding open-coding etc.) next stage1.
Comment 5 Richard Biener 2023-02-21 13:04:34 UTC
Honza - the test still fails.
Comment 6 GCC Commits 2023-03-06 10:09:23 UTC
The master branch has been updated by Jan Hubicka <hubicka@gcc.gnu.org>:

https://gcc.gnu.org/g:b83acefb0409056b566133f66843ead6c04b8474

commit r13-6502-gb83acefb0409056b566133f66843ead6c04b8474
Author: Jan Hubicka <jh@suse.cz>
Date:   Mon Mar 6 11:08:26 2023 +0100

    Enable scatter for generic
    
    2023-03-06  Jan Hubicka  <hubicka@ucw.cz>
    
            PR target/108429
            * config/i386/x86-tune.def (X86_TUNE_USE_SCATTER_2PARTS): Enable for
            generic.
            (X86_TUNE_USE_SCATTER_4PARTS): Likewise.
            (X86_TUNE_USE_SCATTER): Likewise.
Comment 7 Jan Hubicka 2023-03-06 10:10:34 UTC
Fixed.
Comment 8 GCC Commits 2023-03-14 08:48:47 UTC
The releases/gcc-12 branch has been updated by Jan Hubicka <hubicka@gcc.gnu.org>:

https://gcc.gnu.org/g:27e02e9fc388d7dc86ec10bedc6b8f13ec94725a

commit r12-9251-g27e02e9fc388d7dc86ec10bedc6b8f13ec94725a
Author: Jan Hubicka <jh@suse.cz>
Date:   Mon Mar 6 11:08:26 2023 +0100

    Enable scatter for generic
    
    2023-03-06  Jan Hubicka  <hubicka@ucw.cz>
    
            PR target/108429
            * config/i386/x86-tune.def (X86_TUNE_USE_SCATTER_2PARTS): Enable for
            generic.
            (X86_TUNE_USE_SCATTER_4PARTS): Likewise.
            (X86_TUNE_USE_SCATTER): Likewise.
    
    (cherry picked from commit b83acefb0409056b566133f66843ead6c04b8474)