https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116032
Bug ID: 116032
Summary: [12/13/14/15 Regression] gcc.target/arm/pr40457-2.c
produces larger code for armv7ve+neon
Product: gcc
Version: 13.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: azoff at gcc dot gnu.org
Target Milestone: ---
In test case gcc.target/arm/pr40457-2.c, scan-assembler "strd|stm" fails on
-march=armv7ve+neon as it emits vst1 instruction with a literal pool.
Below assembly was generated using: arm-none-eabi-gcc
gcc/testsuite/gcc.target/arm/pr40457-2.c -mthumb -march=armv7ve+neon
-mfloat-abi=hard -O2 -S -o -
With r12-4239-g50e20ee6e40:
.arch armv7-a
.arch_extension virt
.arch_extension idiv
.arch_extension sec
.arch_extension mp
.fpu neon
.eabi_attribute 28, 1
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 1
.eabi_attribute 30, 2
.eabi_attribute 34, 1
.eabi_attribute 18, 4
.file "pr40457-2.c"
.text
.align 1
.align 2
.global foo
.syntax unified
.thumb
.thumb_func
.type foo, %function
foo:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
movs r2, #1
movs r3, #0
strd r2, r3, [r0]
bx lr
.size foo, .-foo
.ident "GCC: (r12-4239-g50e20ee6e40) 12.0.0 20211008 (experimental)"
With r12-4240-g2b8453c401b:
.arch armv7-a
.arch_extension virt
.arch_extension idiv
.arch_extension sec
.arch_extension mp
.fpu neon
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 1
.eabi_attribute 30, 2
.eabi_attribute 34, 1
.eabi_attribute 18, 4
.file "pr40457-2.c"
.text
.align 1
.align 2
.global foo
.syntax unified
.thumb
.thumb_func
.type foo, %function
foo:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
vldr d16, .L3
vst1.32 {d16}, [r0]
bx lr
.L4:
.align 3
.L3:
.word 1
.word 0
.size foo, .-foo
.ident "GCC: (r12-4240-g2b8453c401b) 12.0.0 20211008 (experimental)"
I sent a patch that added the "vst1" instruction to the allowed list in the
test case in https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657772.html,
but it was instead suggested to log a ticket for reviewing the SLP cost model
for arm.