https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115487
Bug ID: 115487
Summary: -march=cascadelake causes spilling
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
When looking at the report of gcc.target/i386/vect-strided-3.c FAILing with
-march=cascadelake I arrived at using -mno-sse4 instead of just -mno-avx
to avoid pextrq from being used instead of movhps.
But then adding -m32 does
movq %xmm3, 8(%esp)
movd 12(%esp), %xmm1
movd 8(%esp), %xmm0
..
punpckldq %xmm1, %xmm0
but only when -march=cascadelake, not with -march=x86-64. So this confuses
the -march=cascadelake -m32 testresult. Same with -march=znver2 but not
with -mavx2 -mno-sse4.
diff --git a/gcc/testsuite/gcc.target/i386/vect-strided-3.c
b/gcc/testsuite/gcc.target/i386/vect-strided-3.c
index b462701a0b2..f9c54a6f715 100644
--- a/gcc/testsuite/gcc.target/i386/vect-strided-3.c
+++ b/gcc/testsuite/gcc.target/i386/vect-strided-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -msse2 -mno-avx -fno-tree-slp-vectorize" } */
+/* { dg-options "-O2 -msse2 -mno-sse4 -fno-tree-slp-vectorize" } */
void foo (int * __restrict a, int *b, int s)
{