https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116623
Bug ID: 116623 Summary: [15 regression] regressions on arm-linux-gnueabihf since r15-1619-g3b9b8d6cfdf593 Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: testsuite-fail Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: thiago.bauermann at linaro dot org CC: jskumari at gcc dot gnu.org Target Milestone: --- Target: arm Since commit r15-1619-g3b9b8d6cfdf593 we see these regressions on armv8l-linux-gnueabihf: Running gcc:gcc.target/arm/arm.exp ... FAIL: gcc.target/arm/bfloat16_scalar_1_1.c check-function-bodies bfloat_mov_mr FAIL: gcc.target/arm/bfloat16_scalar_1_2.c check-function-bodies bfloat_mov_mr FAIL: gcc.target/arm/bfloat16_scalar_2_1.c check-function-bodies bfloat_mov_mr FAIL: gcc.target/arm/bfloat16_scalar_2_2.c check-function-bodies bfloat_mov_mr FAIL: gcc.target/arm/bfloat16_scalar_3_1.c check-function-bodies bfloat_mov_mr FAIL: gcc.target/arm/bfloat16_scalar_3_2.c check-function-bodies bfloat_mov_mr Running gcc:gcc.target/arm/mve/mve.exp ... FAIL: gcc.target/arm/mve/dlstp-compile-asm-2.c check-function-bodies test5 FAIL: gcc.target/arm/mve/dlstp-compile-asm-2.c check-function-bodies test8 The bfloat16_scalar_*.c failures are all about the same code change: body: .*\tldrh r4, \[.*\] @ __bf16 .*\tbx lr against: push {r4} sub sp, sp, #12 #foo ldrh r3, [sp, #6] @ __bf16 mov r4, r3 @ __bf16 #foo add sp, sp, #12 ldr r4, [sp], #4 bx lr Diff from before and after assembly file: --- before/bfloat16_scalar_1_1.s 2024-09-05 20:19:02.000000000 -0300 +++ after/bfloat16_scalar_1_1.s 2024-09-05 19:57:59.000000000 -0300 @@ -193,7 +193,8 @@ @ 0 "" 2 .thumb .syntax unified - ldrh r4, [sp, #6] @ __bf16 + ldrh r3, [sp, #6] @ __bf16 + mov r4, r3 @ __bf16 .syntax unified @ 117 "/home/thiago.bauermann/src/gcc/gcc/testsuite/gcc.target/arm/bfloat16_scalar_1_1.c" 1 #foo The gcc.target/arm/mve/dlstp-compile-asm-2.c failures are a bit more involved: body: .*\tdlstp.8 lr, r[0-9]+ .*\tvldrb.8 q[0-9]+, \[r1\] \tvldrb.8 q[0-9]+, \[r2\] .*\tvadd.i8 (q[0-9]+), q[0-9]+, q[0-9]+ .*\tvstrb.8 \1, \[r2\] \tvstrb.8 \1, \[r3\] \tletp lr, .* .* against: push {r4, r5, r6, lr} ldr ip, [sp, #16] cmp ip, #0 ble .L37 mov r6, r3 sub r3, ip, #16 add r5, r2, ip add r4, r1, ip add r0, r0, ip dlstp.8 lr, ip sub r2, r4, ip sub r1, r0, ip vldrb.8 q3, [r1] vldrb.8 q2, [r2] sub r2, r5, ip mov ip, r3 subs r3, r3, #16 vadd.i8 q3, q3, q2 vstrb.8 q3, [r2] vstrb.8 q3, [r6] letp lr, .L39 pop {r4, r5, r6, pc} FAIL: gcc.target/arm/mve/dlstp-compile-asm-2.c check-function-bodies test5 body: .*\tdlstp.32 lr, r3 \tvldrw.32 q[0-9]+, \[r0\], #16 \tvctp.32 r4 \tvpst \tvldrwt.32 q[0-9]+, \[r1\], #16 .*\tvadd.i32 (q[0-9]+), q[0-9]+, q[0-9]+ \tvstrw.32 \1, \[r2\], #16 \tletp lr, .* .* against: push {lr} ldr ip, [sp, #4] cmp r3, #0 ble .L59 dlstp.32 lr, r3 vldrw.32 q3, [r0], #16 vctp.32 ip vpst vldrwt.32 q2, [r1], #16 add ip, ip, #1 vadd.i32 q3, q3, q2 vstrw.32 q3, [r2], #16 letp lr, .L61 ldr pc, [sp], #4 FAIL: gcc.target/arm/mve/dlstp-compile-asm-2.c check-function-bodies test8 Diff from before and after assembly file: --- before/dlstp-compile-asm-2.s 2024-09-05 20:14:36.000000000 -0300 +++ after/dlstp-compile-asm-2.s 2024-09-05 20:10:07.000000000 -0300 @@ -140,25 +140,26 @@ @ args = 4, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} - ldr r4, [sp, #16] - cmp r4, #0 + ldr ip, [sp, #16] + cmp ip, #0 ble .L37 - sub ip, r4, #16 - adds r6, r2, r4 - adds r5, r1, r4 - add r0, r0, r4 - dlstp.8 lr, r4 + mov r6, r3 + sub r3, ip, #16 + add r5, r2, ip + add r4, r1, ip + add r0, r0, ip + dlstp.8 lr, ip .L39: - subs r2, r5, r4 - subs r1, r0, r4 + sub r2, r4, ip + sub r1, r0, ip vldrb.8 q3, [r1] vldrb.8 q2, [r2] - subs r2, r6, r4 - mov r4, ip - sub ip, ip, #16 + sub r2, r5, ip + mov ip, r3 + subs r3, r3, #16 vadd.i8 q3, q3, q2 vstrb.8 q3, [r2] - vstrb.8 q3, [r3] + vstrb.8 q3, [r6] letp lr, .L39 .L37: pop {r4, r5, r6, pc} @@ -227,22 +228,22 @@ test8: @ args = 4, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 - push {r4, lr} - ldr r4, [sp, #8] + push {lr} + ldr ip, [sp, #4] cmp r3, #0 ble .L59 dlstp.32 lr, r3 .L61: vldrw.32 q3, [r0], #16 - vctp.32 r4 + vctp.32 ip vpst vldrwt.32 q2, [r1], #16 - adds r4, r4, #1 + add ip, ip, #1 vadd.i32 q3, q3, q2 vstrw.32 q3, [r2], #16 letp lr, .L61 .L59: - pop {r4, pc} + ldr pc, [sp], #4 .size test8, .-test8 .align 1 .p2align 2,,3 Configure flags: ~/src/gcc//configure" \ SHELL=/bin/bash \ --with-gnu-as \ --with-gnu-ld \ --enable-lto \ --enable-shared \ --without-included-gettext \ --enable-nls \ --with-system-zlib \ --disable-sjlj-exceptions \ --enable-gnu-unique-object \ --enable-linker-build-id \ --disable-libstdcxx-pch \ --enable-c99 \ --enable-clocale=gnu \ --enable-libstdcxx-debug \ --enable-long-long \ --with-isl=no \ --disable-multilib \ --with-float=hard \ --with-fpu=neon-fp-armv8 \ --with-mode=thumb \ --with-arch=armv8-a \ --enable-threads=posix \ --enable-multiarch \ --enable-libstdcxx-time=yes \ --enable-gnu-indirect-function \ --enable-checking=yes \ --disable-bootstrap \ --enable-languages=c,c++,fortran,lto \ --prefix=/tmp/gcc-native-arm-linux-gnueabihf \ --build=arm-linux-gnueabihf \ --host=arm-linux-gnueabihf \ --target=arm-linux-gnueabihf We also see regressions caused by this commit in other testcases on aarch64-linux-gnu and yet others on arm-none-eabi, but I'm filing separate bugzillas for those.