]> git.ipfire.org Git - thirdparty/gcc.git/commit
VECT: Support SLP MASK_LEN_GATHER_LOAD with conditional mask
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Thu, 26 Oct 2023 11:50:19 +0000 (19:50 +0800)
committerRobin Dapp <rdapp@ventanamicro.com>
Tue, 31 Oct 2023 20:07:46 +0000 (21:07 +0100)
commitf66b2fc122b8a17591afbb881d580b32e8ddb708
treed08ea4d306af3bbf00ec70ed32b3feb44d324898
parent327d38f1018341b37f976ed6131a1e1fc4aae89f
VECT: Support SLP MASK_LEN_GATHER_LOAD with conditional mask

This patch leverage current MASK_GATHER_LOAD to support SLP MASK_LEN_GATHER_LOAD with condtional mask.

Unconditional MASK_LEN_GATHER_LOAD (base, offset, scale, zero, -1) SLP is not included in this patch
since it seems that we can't support it in the middle-end:

FAIL: gcc.dg/tree-ssa/pr44306.c (internal compiler error: in vectorizable_load, at tree-vect-stmts.cc:9885)

May be we should support GATHER_LOAD explictily in RISC-V backend to walk around this issue.

I am gonna support GATHER_LOAD explictly work around in RISC-V backend.

This patch also adds conditional gather load test since there is no conditional gather load test.

Ok for trunk ?

gcc/ChangeLog:

* tree-vect-slp.cc (vect_get_operand_map): Add MASK_LEN_GATHER_LOAD.
(vect_build_slp_tree_1): Ditto.
(vect_build_slp_tree_2): Ditto.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/vect-gather-6.c: New test.
gcc/testsuite/gcc.dg/vect/vect-gather-6.c [new file with mode: 0644]
gcc/tree-vect-slp.cc