aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/dump-parse-tree.cc
diff options
context:
space:
mode:
authorKewen Lin <linkw@linux.ibm.com>2023-07-12 21:23:22 -0500
committerKewen Lin <linkw@linux.ibm.com>2023-07-12 23:12:16 -0500
commita3118d7c153dc9c0af9d892903dc4ebc69f654b0 (patch)
treedb4887115e57979f39c47f4268d4b8103406b35c /gcc/fortran/dump-parse-tree.cc
parent5f03844b32f45224c33dcea08a20b5a2089082f7 (diff)
downloadgcc-a3118d7c153dc9c0af9d892903dc4ebc69f654b0.zip
gcc-a3118d7c153dc9c0af9d892903dc4ebc69f654b0.tar.gz
gcc-a3118d7c153dc9c0af9d892903dc4ebc69f654b0.tar.bz2
vect: Adjust vectorizable_load costing on VMAT_CONTIGUOUS_PERMUTE
This patch adjusts the cost handling on VMAT_CONTIGUOUS_PERMUTE in function vectorizable_load. We don't call function vect_model_load_cost for it any more. As the affected test case gcc.target/i386/pr70021.c shows, the previous costing can under-cost the total generated vector loads as for VMAT_CONTIGUOUS_PERMUTE function vect_model_load_cost doesn't consider the group size which is considered as vec_num during the transformation. This patch makes the count of vector load in costing become consistent with what we generates during the transformation. To be more specific, for the given test case, for memory access b[i_20], it costed for 2 vector loads before, with this patch it costs 8 instead, it matches the final count of generated vector loads basing from b. This costing change makes cost model analysis feel it's not profitable to vectorize the first loop, so this patch adjusts the test case without vect cost model any more. But note that this test case also exposes something we can improve further is that although the number of vector permutation what we costed and generated are consistent, but DCE can further optimize some unused permutation out, it would be good if we can predict that and generate only those necessary permutations. gcc/ChangeLog: * tree-vect-stmts.cc (vect_model_load_cost): Assert this function only handle memory_access_type VMAT_CONTIGUOUS, remove some VMAT_CONTIGUOUS_PERMUTE related handlings. (vectorizable_load): Adjust the cost handling on VMAT_CONTIGUOUS_PERMUTE without calling vect_model_load_cost. gcc/testsuite/ChangeLog: * gcc.target/i386/pr70021.c: Adjust with -fno-vect-cost-model.
Diffstat (limited to 'gcc/fortran/dump-parse-tree.cc')
0 files changed, 0 insertions, 0 deletions