Bug 116566 - SLP induction support limited for variable-length vectors
Summary: SLP induction support limited for variable-length vectors
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 15.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on:
Blocks: vectorizer
  Show dependency treegraph
 
Reported: 2024-09-02 09:50 UTC by Richard Biener
Modified: 2024-10-02 09:14 UTC (History)
1 user (show)

See Also:
Host:
Target: aarch64 riscv64
Build:
Known to work:
Known to fail:
Last reconfirmed: 2024-09-30 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2024-09-02 09:50:32 UTC
This blocks the SLP transition.  We should be able to use build_vec_series
and for group_size > 1 interleave those vectors (though group_size > 1 support
is not priority).

gcc.dg/vect/slp-19c.c fails to fully SLP for this for example.
Comment 1 Richard Biener 2024-09-30 14:17:42 UTC
I'm looking into this now.
Comment 2 GCC Commits 2024-10-02 09:12:39 UTC
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

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

commit r15-4012-gba7632674a2a9ba8193f082c8ca9614c642de3b7
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Sep 30 17:06:24 2024 +0200

    tree-optimization/116566 - single lane SLP for VLA inductions
    
    The following adds SLP support for vectorizing single-lane inductions
    with variable length vectors.
    
            PR tree-optimization/116566
            * tree-vect-loop.cc (vectorizable_induction): Handle single-lane
            SLP for VLA vectors.
    
            * gcc.dg/tree-ssa/reassoc-46.c: When using partial vectors
            the dump-scan doesn't look for the required .COND_ADD so
            skip for partial vectors.
Comment 3 Richard Biener 2024-10-02 09:14:18 UTC
Now supported for single-lane SLP thus no longer blocks PR116578.  Still enhancing should be possible, at least for a power-of-two number of induction lanes or the case of uniform inductions.