diff mbox series

testsuite: Fix gcc.target/i386/auto-init-* tests.

Message ID 22B37A10-936C-4525-AF10-E0851E2AE94A@oracle.com
State New
Headers show
Series testsuite: Fix gcc.target/i386/auto-init-* tests. | expand

Commit Message

Qing Zhao Sept. 17, 2021, 4:55 p.m. UTC
Hi,

This is the patch to fix gcc.target/i386/auto-init-* tests.

I have tested the change at X86_64-linux with

make check-gcc RUNTESTFLAGS='--target_board=unix\{-m64,-m64/-march=skylake-avx512,-m64/-fstack-protector-all,-m64/-fstack-clash-protection,-m32/-mno-sse,-m32/-mtune=bonnell,-m32/-march=bonnell,-m32/-fstack-protector-all/-fstack-clash-protection\} i386.exp=auto-init*’

make check-gcc RUNTESTFLAGS='--target_board=unix\{-m64,-m64/-march=skylake-avx512/-fPIC,-m64/-fstack-protector-all/-fPIC,-m64/-fstack-clash-protection/-fPIC,-m32/-mno-sse/-fPIC,-m32/-mtune=bonnell/-fPIC,-m32/-march=bonnell/-fPIC,-m32/-fstack-protector-all/-fstack-clash-protection/-fPIC\} i386.exp=auto-init*’

Everything works fine.

Okay for commit?

Thanks.

Qing

**************************

testsuite: Fix gcc.target/i386/auto-init-* tests.

This set of tests failed on many different combination of -march, -mtune.
some of them failed with -fstack-protestor-all, or -mno-sse. And the
pattern matches are also different on lp64 or ia32.

The reason for these failures is that the RTL or assembly level patten
matches are only valid for -march=x86-64 -mtune=generic.

We restrict the testing only for -march=x86-64 and -mtune=generic. Also
add -fno-stack-protector or -msse for some of the testing cases. 

gcc/testsuite/ChangeLog:

2021-09-17  qing zhao  <qing.zhao@oracle.com>

	* gcc.target/i386/auto-init-1.c: Restrict the testing only for
	-march=x86-64 and -mtune=generic. Add -fno-stack-protector.
	* gcc.target/i386/auto-init-2.c: Restrict the testing only for
	-march=x86-64 and -mtune=generic -msse.
	* gcc.target/i386/auto-init-3.c: Likewise.
	* gcc.target/i386/auto-init-4.c: Likewise.
	* gcc.target/i386/auto-init-5.c: Different pattern match for lp64 and
	ia32.
	* gcc.target/i386/auto-init-6.c: Restrict the testing only for
	-march=x86-64 and -mtune-generic -msse. Add -fno-stack-protector.
	* gcc.target/i386/auto-init-7.c: Likewise.
	* gcc.target/i386/auto-init-8.c: Restrict the testing only for
	-march=x86-64 and -mtune=generic -msse..
	* gcc.target/i386/auto-init-padding-1.c: Likewise.
	* gcc.target/i386/auto-init-padding-10.c: Likewise.
	* gcc.target/i386/auto-init-padding-11.c: Likewise.
	* gcc.target/i386/auto-init-padding-12.c: Likewise.
	* gcc.target/i386/auto-init-padding-2.c: Likewise.
	* gcc.target/i386/auto-init-padding-3.c: Restrict the testing only for
	-march=x86-64. Different pattern match for lp64 and ia32.
	* gcc.target/i386/auto-init-padding-4.c: Restrict the testing only for
	-march=x86-64 and -mtune-generic -msse.
	* gcc.target/i386/auto-init-padding-5.c: Likewise.
	* gcc.target/i386/auto-init-padding-6.c: Likewise.
	* gcc.target/i386/auto-init-padding-7.c: Restrict the testing only for
	-march=x86-64 and -mtune-generic -msse. Add -fno-stack-protector.
	* gcc.target/i386/auto-init-padding-8.c: Likewise.
	* gcc.target/i386/auto-init-padding-9.c: Restrict the testing only for
	-march=x86-64. Different pattern match for lp64 and ia32.

****************

From dd9902a95fb0631f5e2eecb37e76b559913484c7 Mon Sep 17 00:00:00 2001
From: Qing Zhao <qing.zhao@oracle.com>
Date: Fri, 17 Sep 2021 14:49:25 +0000
Subject: [PATCH] Fix i386 testing cases

---
 gcc/testsuite/gcc.target/i386/auto-init-1.c          |  2 +-
 gcc/testsuite/gcc.target/i386/auto-init-2.c          |  8 +++++---
 gcc/testsuite/gcc.target/i386/auto-init-3.c          |  5 +++--
 gcc/testsuite/gcc.target/i386/auto-init-4.c          | 10 ++++++----
 gcc/testsuite/gcc.target/i386/auto-init-5.c          |  5 +++--
 gcc/testsuite/gcc.target/i386/auto-init-6.c          |  2 +-
 gcc/testsuite/gcc.target/i386/auto-init-7.c          |  2 +-
 gcc/testsuite/gcc.target/i386/auto-init-8.c          |  2 +-
 gcc/testsuite/gcc.target/i386/auto-init-padding-1.c  |  2 +-
 gcc/testsuite/gcc.target/i386/auto-init-padding-10.c |  2 +-
 gcc/testsuite/gcc.target/i386/auto-init-padding-11.c |  2 +-
 gcc/testsuite/gcc.target/i386/auto-init-padding-12.c |  2 +-
 gcc/testsuite/gcc.target/i386/auto-init-padding-2.c  |  2 +-
 gcc/testsuite/gcc.target/i386/auto-init-padding-3.c  |  8 +++++---
 gcc/testsuite/gcc.target/i386/auto-init-padding-4.c  |  2 +-
 gcc/testsuite/gcc.target/i386/auto-init-padding-5.c  |  2 +-
 gcc/testsuite/gcc.target/i386/auto-init-padding-6.c  |  2 +-
 gcc/testsuite/gcc.target/i386/auto-init-padding-7.c  |  5 +++--
 gcc/testsuite/gcc.target/i386/auto-init-padding-8.c  |  7 +++----
 gcc/testsuite/gcc.target/i386/auto-init-padding-9.c  |  7 +++++--
 20 files changed, 45 insertions(+), 34 deletions(-)

Comments

Jakub Jelinek Sept. 17, 2021, 4:59 p.m. UTC | #1
On Fri, Sep 17, 2021 at 04:55:22PM +0000, Qing Zhao wrote:
> This is the patch to fix gcc.target/i386/auto-init-* tests.
> 
> I have tested the change at X86_64-linux with
> 
> make check-gcc RUNTESTFLAGS='--target_board=unix\{-m64,-m64/-march=skylake-avx512,-m64/-fstack-protector-all,-m64/-fstack-clash-protection,-m32/-mno-sse,-m32/-mtune=bonnell,-m32/-march=bonnell,-m32/-fstack-protector-all/-fstack-clash-protection\} i386.exp=auto-init*’
> 
> make check-gcc RUNTESTFLAGS='--target_board=unix\{-m64,-m64/-march=skylake-avx512/-fPIC,-m64/-fstack-protector-all/-fPIC,-m64/-fstack-clash-protection/-fPIC,-m32/-mno-sse/-fPIC,-m32/-mtune=bonnell/-fPIC,-m32/-march=bonnell/-fPIC,-m32/-fstack-protector-all/-fstack-clash-protection/-fPIC\} i386.exp=auto-init*’
> 
> Everything works fine.
> 
> Okay for commit?

LGTM.

	Jakub
Qing Zhao Sept. 17, 2021, 5:31 p.m. UTC | #2
> On Sep 17, 2021, at 11:59 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> 
> On Fri, Sep 17, 2021 at 04:55:22PM +0000, Qing Zhao wrote:
>> This is the patch to fix gcc.target/i386/auto-init-* tests.
>> 
>> I have tested the change at X86_64-linux with
>> 
>> make check-gcc RUNTESTFLAGS='--target_board=unix\{-m64,-m64/-march=skylake-avx512,-m64/-fstack-protector-all,-m64/-fstack-clash-protection,-m32/-mno-sse,-m32/-mtune=bonnell,-m32/-march=bonnell,-m32/-fstack-protector-all/-fstack-clash-protection\} i386.exp=auto-init*’
>> 
>> make check-gcc RUNTESTFLAGS='--target_board=unix\{-m64,-m64/-march=skylake-avx512/-fPIC,-m64/-fstack-protector-all/-fPIC,-m64/-fstack-clash-protection/-fPIC,-m32/-mno-sse/-fPIC,-m32/-mtune=bonnell/-fPIC,-m32/-march=bonnell/-fPIC,-m32/-fstack-protector-all/-fstack-clash-protection/-fPIC\} i386.exp=auto-init*’
>> 
>> Everything works fine.
>> 
>> Okay for commit?
> 
> LGTM.

Thank you.

I will commit the change soon.

For the aarch64 tests, do you have a suggestion on what the option combination I should test?

Qing
> 
> 	Jakub
>
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/i386/auto-init-1.c b/gcc/testsuite/gcc.target/i386/auto-init-1.c
index b7690df..3391be1 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-1.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-1.c
@@ -1,6 +1,6 @@ 
 /* Verify zero initialization for integer and pointer type automatic variables.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=zero -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=zero -fdump-rtl-expand -fno-stack-protector -march=x86-64 -mtune=generic" } */
 
 #ifndef __cplusplus
 # define bool _Bool
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-2.c b/gcc/testsuite/gcc.target/i386/auto-init-2.c
index e76fc25..b23f733 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-2.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-2.c
@@ -1,6 +1,6 @@ 
 /* Verify pattern initialization for integer and pointer type automatic variables.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand -march=x86-64 -mtune=generic -msse" } */
 
 #ifndef __cplusplus
 # define bool _Bool
@@ -31,6 +31,8 @@  void foo()
 
 /* { dg-final { scan-rtl-dump-times "0xfffffffffffffffe" 2 "expand" } } */
 /* { dg-final { scan-rtl-dump-times "0xfffffffffffffefe" 1 "expand" } } */
-/* { dg-final { scan-rtl-dump-times "0xfffffffffefefefe" 2 "expand" } } */
-/* { dg-final { scan-rtl-dump-times "0xfefefefefefefefe" 3 "expand" } } */
+/* { dg-final { scan-rtl-dump-times "0xfffffffffefefefe" 2 "expand" { target lp64 } } } */
+/* { dg-final { scan-rtl-dump-times "0xfefefefefefefefe" 3 "expand" { target lp64 } } } */
+/* { dg-final { scan-rtl-dump-times "0xfffffffffefefefe" 4 "expand" { target ia32 } } } */
+/* { dg-final { scan-rtl-dump-times "0xfefefefefefefefe" 1 "expand" { target ia32 } } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-3.c b/gcc/testsuite/gcc.target/i386/auto-init-3.c
index 300ddfb..df31761 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-3.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-3.c
@@ -1,6 +1,6 @@ 
 /* Verify zero initialization for floating point type automatic variables.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=zero" } */
+/* { dg-options "-ftrivial-auto-var-init=zero -march=x86-64 -mtune=generic" } */
 
 long double result;
 
@@ -14,4 +14,5 @@  long double foo()
   return result;
 }
 
-/* { dg-final { scan-assembler-times "pxor\t\\\%xmm0, \\\%xmm0" 3 } } */
+/* { dg-final { scan-assembler-times "pxor\t\\\%xmm0, \\\%xmm0" 3  { target lp64 } } } */
+/* { dg-final { scan-assembler-times "fldz" 3  { target ia32} } } */
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-4.c b/gcc/testsuite/gcc.target/i386/auto-init-4.c
index abe0b7e..554a2c5 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-4.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-4.c
@@ -1,6 +1,6 @@ 
 /* Verify pattern initialization for floating point type automatic variables.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand -march=x86-64 -mtune=generic -msse" } */
 
 long double result;
 
@@ -14,7 +14,9 @@  long double foo()
   return result;
 }
 
-/* { dg-final { scan-rtl-dump-times "0xfffffffffefefefe" 1 "expand" } } */
-/* { dg-final { scan-rtl-dump-times "\\\[0xfefefefefefefefe\\\]" 1 "expand" } } */
-/* { dg-final { scan-rtl-dump-times "0xfffffffffffffffe\\\]\\\) repeated x16" 1 "expand" } } */
+/* { dg-final { scan-rtl-dump-times "0xfffffffffefefefe" 1 "expand" { target lp64 } } } */
+/* { dg-final { scan-rtl-dump-times "\\\[0xfefefefefefefefe\\\]" 1 "expand" { target lp64 } } } */
+/* { dg-final { scan-rtl-dump-times "0xfffffffffffffffe\\\]\\\) repeated x16" 1 "expand" { target lp64 } } } */
+/* { dg-final { scan-rtl-dump-times "0xfffffffffefefefe" 2 "expand" { target ia32 } } } */
+/* { dg-final { scan-rtl-dump-times "\\\[0xfefefefefefefefe\\\]" 2 "expand" { target ia32 } } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-5.c b/gcc/testsuite/gcc.target/i386/auto-init-5.c
index b2e708c..27d971f 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-5.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-5.c
@@ -1,6 +1,6 @@ 
 /* Verify zero initialization for complex type automatic variables.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=zero -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=zero" } */
 
 
 _Complex long double result;
@@ -15,6 +15,7 @@  _Complex long double foo()
   return result;
 }
 
-/* { dg-final { scan-assembler-times "\\.long\t0" 14 } } */
+/* { dg-final { scan-assembler-times "\\.long\t0" 14 { target lp64 } } } */
+/* { dg-final { scan-assembler-times "\\.long\t0" 12 { target ia32 } } } */
 
 
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-6.c b/gcc/testsuite/gcc.target/i386/auto-init-6.c
index c79c039..f75081e 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-6.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-6.c
@@ -1,6 +1,6 @@ 
 /* Verify pattern initialization for complex type automatic variables.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand -march=x86-64 -mtune=generic -msse" } */
 
 
 _Complex long double result;
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-7.c b/gcc/testsuite/gcc.target/i386/auto-init-7.c
index 0114379..7e32576 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-7.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-7.c
@@ -1,6 +1,6 @@ 
 /* Verify zero initialization for array, union, and structure type automatic variables.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=zero -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=zero -fdump-rtl-expand -march=x86-64 -mtune=generic -fno-stack-protector -msse" } */
 
 struct S
 {
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-8.c b/gcc/testsuite/gcc.target/i386/auto-init-8.c
index 28fbeb7..666ee14 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-8.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-8.c
@@ -1,6 +1,6 @@ 
 /* Verify pattern initialization for array, union, and structure type automatic variables.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand -march=x86-64 -mtune=generic -msse" } */
 
 struct S
 {
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-padding-1.c b/gcc/testsuite/gcc.target/i386/auto-init-padding-1.c
index a238b8b..149a04f 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-padding-1.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-padding-1.c
@@ -1,7 +1,7 @@ 
 /* Verify zero initialization for structure type automatic variables with
    padding.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=zero -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=zero -fdump-rtl-expand -march=x86-64 -mtune=generic -msse" } */
 
 struct test_aligned {
         int internal1;
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-padding-10.c b/gcc/testsuite/gcc.target/i386/auto-init-padding-10.c
index 3fc6b07..1125bcf 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-padding-10.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-padding-10.c
@@ -1,7 +1,7 @@ 
 /* Verify pattern initialization for array type with structure element with
    padding.  */ 
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand -march=x86-64 -mtune=generic -msse" } */
 
 struct test_trailing_hole {
         int one;
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-padding-11.c b/gcc/testsuite/gcc.target/i386/auto-init-padding-11.c
index cc982b9..4f90ad2 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-padding-11.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-padding-11.c
@@ -1,7 +1,7 @@ 
 /* Verify zero initialization for union type with structure field with
    padding.  */ 
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=zero -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=zero -fdump-rtl-expand -march=x86-64 -mtune=generic -msse" } */
 
 struct test_trailing_hole {
         int one;
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-padding-12.c b/gcc/testsuite/gcc.target/i386/auto-init-padding-12.c
index 0fbdb6c..21a1ee2 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-padding-12.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-padding-12.c
@@ -1,7 +1,7 @@ 
 /* Verify pattern initialization for union type with structure field with
    padding.  */ 
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand -march=x86-64 -mtune=generic -msse" } */
 
 struct test_trailing_hole {
         int one;
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-padding-2.c b/gcc/testsuite/gcc.target/i386/auto-init-padding-2.c
index 5739aa1..483b79a 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-padding-2.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-padding-2.c
@@ -1,7 +1,7 @@ 
 /* Verify pattern initialization for structure type automatic variables with
    padding.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand -march=x86-64 -mtune=generic -msse" } */
 
 struct test_aligned {
         int internal1;
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-padding-3.c b/gcc/testsuite/gcc.target/i386/auto-init-padding-3.c
index 8a6d764..220a9f2 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-padding-3.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-padding-3.c
@@ -1,7 +1,7 @@ 
 /* Verify zero initialization for nested structure type automatic variables with
    padding.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=zero" } */
+/* { dg-options "-ftrivial-auto-var-init=zero -march=x86-64" } */
 
 struct test_aligned {
         unsigned internal1;
@@ -24,7 +24,9 @@  int foo ()
 }
 
 /* { dg-final { scan-assembler "movl\t\\\$0," } } */
-/* { dg-final { scan-assembler "movl\t\\\$16," } } */
-/* { dg-final { scan-assembler "rep stosq" } } */
+/* { dg-final { scan-assembler "movl\t\\\$16," { target lp64 } } } */
+/* { dg-final { scan-assembler "rep stosq" { target lp64 } } } */
+/* { dg-final { scan-assembler "movl\t\\\$32," { target ia32 } } } */
+/* { dg-final { scan-assembler "rep stosl" { target ia32 } } } */
 
 
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-padding-4.c b/gcc/testsuite/gcc.target/i386/auto-init-padding-4.c
index d7be326..2908b3f 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-padding-4.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-padding-4.c
@@ -1,7 +1,7 @@ 
 /* Verify pattern initialization for nested structure type automatic variables with
    padding.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand -march=x86-64 -mtune=generic -msse" } */
 
 struct test_aligned {
         unsigned internal1;
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-padding-5.c b/gcc/testsuite/gcc.target/i386/auto-init-padding-5.c
index 569b09a..e17a621 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-padding-5.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-padding-5.c
@@ -1,7 +1,7 @@ 
 /* Verify zero initialization for structure type automatic variables with
    tail padding.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=zero -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=zero -fdump-rtl-expand -march=x86-64 -mtune=generic -msse" } */
 
 struct test_trailing_hole {
         char *one;
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-padding-6.c b/gcc/testsuite/gcc.target/i386/auto-init-padding-6.c
index 4e0b614..754f8af 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-padding-6.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-padding-6.c
@@ -1,7 +1,7 @@ 
 /* Verify pattern initialization for structure type automatic variables with
    tail padding.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand -march=x86-64 -mtune=generic -msse" } */
 
 struct test_trailing_hole {
         char *one;
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-padding-7.c b/gcc/testsuite/gcc.target/i386/auto-init-padding-7.c
index b5abffb..c136e1c 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-padding-7.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-padding-7.c
@@ -1,7 +1,7 @@ 
 /* Verify zero initialization for structure type automatic variables with
    padding and has explicit initialization.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=zero" } */
+/* { dg-options "-ftrivial-auto-var-init=zero -fdump-rtl-expand -march=x86-64 -mtune=generic -msse -fno-stack-protector" } */
 
 struct test_trailing_hole {
         int one;
@@ -17,6 +17,7 @@  int foo ()
   return var.four;
 }
 
-/* { dg-final { scan-assembler-times "movq\t\\\$0," 2 } } */
+/* { dg-final { scan-rtl-dump-times "const_int 0 \\\[0\\\]\\\) repeated x16" 1 "expand" { target ia32 } } } */
+/* { dg-final { scan-rtl-dump-times "const_int 0 \\\[0\\\]\\\)" 1 "expand" { target lp64 } } } */
 
 
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-padding-8.c b/gcc/testsuite/gcc.target/i386/auto-init-padding-8.c
index 66591cf..45baa3c 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-padding-8.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-padding-8.c
@@ -1,7 +1,7 @@ 
 /* Verify pattern initialization for structure type automatic variables with
    padding and has explicit initialization.  */
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=pattern" } */
+/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand -march=x86-64 -mtune=generic -msse -fno-stack-protector" } */
 
 struct test_trailing_hole {
         int one;
@@ -17,6 +17,5 @@  int foo ()
   return var.four;
 }
 
-/* { dg-final { scan-assembler-times "movq\t\\\$0," 2 } } */
-
-
+/* { dg-final { scan-rtl-dump-times "const_int 0 \\\[0\\\]\\\) repeated x16" 1 "expand" { target ia32 } } } */
+/* { dg-final { scan-rtl-dump-times "const_int 0 \\\[0\\\]\\\)" 1 "expand" { target lp64 } } } */
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-padding-9.c b/gcc/testsuite/gcc.target/i386/auto-init-padding-9.c
index 1ff900f..eafa327 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-padding-9.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-padding-9.c
@@ -1,7 +1,7 @@ 
 /* Verify zero initialization for array type with structure element with
    padding.  */ 
 /* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=zero" } */
+/* { dg-options "-ftrivial-auto-var-init=zero -march=x86-64" } */
 
 struct test_trailing_hole {
         int one;
@@ -19,4 +19,7 @@  int foo ()
 }
 
 /* { dg-final { scan-assembler "movl\t\\\$0," } } */
-/* { dg-final { scan-assembler "rep stosq" } } */
+/* { dg-final { scan-assembler "movl\t\\\$20," { target lp64} } } */
+/* { dg-final { scan-assembler "rep stosq" { target lp64 } } } */
+/* { dg-final { scan-assembler "movl\t\\\$40," { target ia32} } } */
+/* { dg-final { scan-assembler "rep stosl" { target ia32 } } } */