group-no-gaps-1.c
2.83 KB
-
[1/7] Remove unnecessary peeling for gaps check · c01e092f
I recently relaxed the peeling-for-gaps conditions for LD3 but kept them as-is for load-and-permute. I don't think the conditions are needed for load-and-permute either though. No current load-and- permute should load outside the group, so if there is no gap at the end, the final vector element loaded will correspond to an element loaded by the original scalar loop. The patch for PR68559 (a missed optimisation PR) increased the peeled cases from "exact_log2 (groupsize) == -1" to "vf % group_size == 0", so before that fix, we didn't peel for gaps if there was no gap at the end of the group and if the group size was a power of 2. The only current non-power-of-2 load-and-permute size is 3, which doesn't require loading more than 3 vectors. The testcase is based on gcc.dg/vect/pr49038.c. Tested on aarch64-linux-gnu and x86_64-linux-gnu. gcc/ * tree-vect-stmts.c (vectorizable_load): Remove unnecessary peeling-for-gaps condition. gcc/testsuite/ * gcc.dg/vect/group-no-gaps-1.c: New test. From-SVN: r238033
Richard Sandiford committed