https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121766
Bug ID: 121766
Summary: [16 regression] Regressions in Snappy workload for
-mcpu=neoverse-v2 after modifying costing hooks
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: soumyaa at gcc dot gnu.org
CC: tamar.christina at arm dot com
Target Milestone: ---
Hi,
After the following commit:
https://gcc.gnu.org/cgit/gcc/commit/?id=08cdd61e
For the following code, compiled with:
-O3 -mcpu=neoverse-v2 -msve-vector-bits=128
#define SIZE 1024
void test (char* data) {
for (int i = 0; i < SIZE; i++) {
data[i] = i;
}
}
NOW:
test:
index z31.s, #0, #1
movi v30.4s, 0x4
add x1, x0, 1024
movi v29.4s, 0x8
movi v28.4s, 0xc
movi v27.4s, 0x10
.p2align 5,,15
.L2:
add v26.4s, v31.4s, v30.4s # 4-7
add v25.4s, v31.4s, v29.4s # 8-11
add v24.4s, v31.4s, v28.4s # 12-15
uzp1 v26.8h, v31.8h, v26.8h # 0-3, 4-7
uzp1 v24.8h, v25.8h, v24.8h # 8-11, 12-15
add v31.4s, v31.4s, v27.4s # 16-19
uzp1 v24.16b, v26.16b, v24.16b # 0-16
str q24, [x0], 16
cmp x1, x0
bne .L2
ret
BEFORE:
test:
.LFB11:
.cfi_startproc
add x1, x0, 1024
index z31.s, #0, #1
ptrue p7.b, vl16
.p2align 5,,15
.L2:
movprfx z30, z31
add z30.s, z30.s, #4
add x0, x0, 8
st1b z31.s, p7, [x0, #-2, mul vl]
st1b z30.s, p7, [x0, #-1, mul vl]
add z31.s, z31.s, #8
cmp x1, x0
bne .L2
ret
Seems like we no longer capture these as possible SVE candidates after
modifying the target hook.
This is seen in BM_UIOVecSink/0 in Snappy, which has had a ~16% regression post
this commit.