[PATCH 09/11] or1k: Update unexpected empty split condition

2021-06-01 Thread Kewen Lin via Gcc-patches
gcc/ChangeLog: * config/or1k/or1k.md (*movdi): Fix empty split condition. --- gcc/config/or1k/or1k.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/or1k/or1k.md b/gcc/config/or1k/or1k.md index eb94efba0e4..495b3e277ba 100644 --- a/gcc/config/or1k/or1k.md +

[PATCH 10/11] sh: Update unexpected empty split condition

2021-06-01 Thread Kewen Lin via Gcc-patches
gcc/ChangeLog: * config/sh/sh.md (doloop_end_split): Fix empty split condition. --- gcc/config/sh/sh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index e3af9ae21c1..93ee7c9a7de 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/c

[PATCH 11/11] sparc: Update unexpected empty split condition

2021-06-01 Thread Kewen Lin via Gcc-patches
gcc/ChangeLog: * config/sparc/sparc.md (*snedi_zero_vis3, *neg_snedi_zero_subxc, *plus_snedi_zero, *plus_plus_snedi_zero, *minus_snedi_zero, *minus_minus_snedi_zero): Fix empty split condition. --- gcc/config/sparc/sparc.md | 12 ++-- 1 file changed, 6 inse

[PATCH 04/11] cris: Update unexpected empty split condition

2021-06-01 Thread Kewen Lin via Gcc-patches
gcc/ChangeLog: * config/cris/cris.md (*addi_reload): Fix empty split condition. --- gcc/config/cris/cris.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md index 7de0ec63fcf..d5a3c703a83 100644 --- a/gcc/config/cris/cri

[PATCH 00/10] vect: Move costing next to the transform for vect store

2023-09-13 Thread Kewen Lin via Gcc-patches
cost model, I also verified the whole patch series was neutral for SPEC2017 int/fp on Power9 at O2, O3 and Ofast separately. [1] https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621460.html Kewen Lin (10): vect: Ensure vect store is supported for some VMAT_ELEMENTWISE case vect: Move

[PATCH 02/10] vect: Move vect_model_store_cost next to the transform in vectorizable_store

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch is an initial patch to move costing next to the transform, it still adopts vect_model_store_cost for costing but moves and duplicates it down according to the handlings of different vect_memory_access_types or some special handling need, hope it can make the subsequent patches easy to re

[PATCH 04/10] vect: Simplify costing on vectorizable_scan_store

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch is to simplify the costing on the case vectorizable_scan_store without calling function vect_model_store_cost any more. I considered if moving the costing into function vectorizable_scan_store is a good idea, for doing that, we have to pass several variables down which are only used for

[PATCH 05/10] vect: Adjust vectorizable_store costing on VMAT_ELEMENTWISE and VMAT_STRIDED_SLP

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch adjusts the cost handling on VMAT_ELEMENTWISE and VMAT_STRIDED_SLP in function vectorizable_store. We don't call function vect_model_store_cost for them any more. Like what we improved for PR82255 on load side, this change helps us to get rid of unnecessary vec_to_scalar costing for so

[PATCH 06/10] vect: Adjust vectorizable_store costing on VMAT_LOAD_STORE_LANES

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch adjusts the cost handling on VMAT_LOAD_STORE_LANES in function vectorizable_store. We don't call function vect_model_store_cost for it any more. It's the case of interleaving stores, so it skips all stmts excepting for first_stmt_info, consider the whole group when costing first_stmt_i

[PATCH 01/10] vect: Ensure vect store is supported for some VMAT_ELEMENTWISE case

2023-09-13 Thread Kewen Lin via Gcc-patches
When making/testing patches to move costing next to the transform code for vectorizable_store, some ICEs got exposed when I further refined the costing handlings on VMAT_ELEMENTWISE. The apparent cause is triggering the assertion in rs6000 specific function for costing rs6000_builtin_vectorization

[PATCH/RFC 08/10] aarch64: Don't use CEIL for vector_store in aarch64_stp_sequence_cost

2023-09-13 Thread Kewen Lin via Gcc-patches
This costing adjustment patch series exposes one issue in aarch64 specific costing adjustment for STP sequence. It causes the below test cases to fail: - gcc/testsuite/gcc.target/aarch64/ldp_stp_15.c - gcc/testsuite/gcc.target/aarch64/ldp_stp_16.c - gcc/testsuite/gcc.target/aarch64/ldp_stp_

[PATCH 07/10] vect: Adjust vectorizable_store costing on VMAT_CONTIGUOUS_PERMUTE

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch adjusts the cost handling on VMAT_CONTIGUOUS_PERMUTE in function vectorizable_store. We don't call function vect_model_store_cost for it any more. It's the case of interleaving stores, so it skips all stmts excepting for first_stmt_info, consider the whole group when costing first_stmt

[PATCH 03/10] vect: Adjust vectorizable_store costing on VMAT_GATHER_SCATTER

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch adjusts the cost handling on VMAT_GATHER_SCATTER in function vectorizable_store (all three cases), then we won't depend on vect_model_load_store for its costing any more. This patch shouldn't have any functional changes. gcc/ChangeLog: * tree-vect-stmts.cc (vect_model_store_co

[PATCH 09/10] vect: Get rid of vect_model_store_cost

2023-09-13 Thread Kewen Lin via Gcc-patches
This patch is to eventually get rid of vect_model_store_cost, it adjusts the costing for the remaining memory access types VMAT_CONTIGUOUS{, _DOWN, _REVERSE} by moving costing close to the transform code. Note that in vect_model_store_cost, there is one special handling for vectorizing a store int

[PATCH 10/10] vect: Consider vec_perm costing for VMAT_CONTIGUOUS_REVERSE

2023-09-13 Thread Kewen Lin via Gcc-patches
For VMAT_CONTIGUOUS_REVERSE, the transform code in function vectorizable_store generates a VEC_PERM_EXPR stmt before storing, but it's never considered in costing. This patch is to make it consider vec_perm in costing, it adjusts the order of transform code a bit to make it easy to early return fo

[PATCH 0/9] rs6000: Rework rs6000_emit_vector_compare

2022-11-24 Thread Kewen Lin via Gcc-patches
22-November/606375.html [2] https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606376.html [3] https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606504.html [4] https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606506.html Kewen Lin (9): rs6000: Rework vector float comparison i

[PATCH 3/9] rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p3

2022-11-24 Thread Kewen Lin via Gcc-patches
All kinds of vector float comparison operators have been supported in a rtl comparison pattern as vector.md, we can just emit an rtx comparison insn with the given comparison operator in function rs6000_emit_vector_compare instead of checking and handling the reverse condition cases. This is part

[PATCH 6/9] rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p2

2022-11-24 Thread Kewen Lin via Gcc-patches
The current handlings in rs6000_emit_vector_compare is a bit complicated to me, especially after we emit vector float comparison insn with the given code directly. So it's better to refactor the handlings of vector integer comparison here. This is part 2, it's to refactor the handlings on LT and

[PATCH 9/9] rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p5

2022-11-24 Thread Kewen Lin via Gcc-patches
The current handlings in rs6000_emit_vector_compare is a bit complicated to me, especially after we emit vector float comparison insn with the given code directly. So it's better to refactor the handlings of vector integer comparison here. This is part 5, it's to refactor all the handlings of vec

[PATCH 1/9] rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p1

2022-11-24 Thread Kewen Lin via Gcc-patches
All kinds of vector float comparison operators have been supported in a rtl comparison pattern as vector.md, we can just emit an rtx comparison insn with the given comparison operator in function rs6000_emit_vector_compare instead of checking and handling the reverse condition cases. This is part

[PATCH 7/9] rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p3

2022-11-24 Thread Kewen Lin via Gcc-patches
The current handlings in rs6000_emit_vector_compare is a bit complicated to me, especially after we emit vector float comparison insn with the given code directly. So it's better to refactor the handlings of vector integer comparison here. This is part 3, it's to refactor the handlings on NE. Thi

[PATCH 2/9] rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p2

2022-11-24 Thread Kewen Lin via Gcc-patches
All kinds of vector float comparison operators have been supported in a rtl comparison pattern as vector.md, we can just emit an rtx comparison insn with the given comparison operator in function rs6000_emit_vector_compare instead of checking and handling the reverse condition cases. This is part

[PATCH 4/9] rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p4

2022-11-24 Thread Kewen Lin via Gcc-patches
All kinds of vector float comparison operators have been supported in a rtl comparison pattern as vector.md, we can just emit an rtx comparison insn with the given comparison operator in function rs6000_emit_vector_compare instead of checking and handling the reverse condition cases. This is part

[PATCH 5/9] rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p1

2022-11-24 Thread Kewen Lin via Gcc-patches
The current handlings in rs6000_emit_vector_compare is a bit complicated to me, especially after we emit vector float comparison insn with the given code directly. So it's better to refactor the handlings of vector integer comparison here. This is part 1, it's to remove the helper function rs6000

[PATCH 8/9] rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p4

2022-11-24 Thread Kewen Lin via Gcc-patches
The current handlings in rs6000_emit_vector_compare is a bit complicated to me, especially after we emit vector float comparison insn with the given code directly. So it's better to refactor the handlings of vector integer comparison here. This is part 4, it's to rework the handlings on GE/GEU/LE

<    1   2