Patchwork Partial fix for PR opt/55177

login
register
mail settings
Submitter Eric Botcazou
Date May 28, 2013, 10:28 a.m.
Message ID <1642736.ufAOS9C6zG@polaris>
Download mbox | patch
Permalink /patch/246824/
State New
Headers show

Comments

Eric Botcazou - May 28, 2013, 10:28 a.m.
> builtin-bswap-9.c fails on ia64, it still generates bswap:DI for foo2,
> foo3 and foo4.

It turns out that you need to combine 4 instructions on the IA-64 to get rid 
of the bswaps, so -O2 (actually -fexpensive-optimizations) is required.

Tested on x86_64-suse-linux, applied on the mainline.


2013-05-28  Eric Botcazou  <ebotcazou@adacore.com>

        * gcc.dg/builtin-bswap-8.c: Compile at -O2.
        * gcc.dg/builtin-bswap-9.c: Likewise.

Patch

Index: gcc.dg/builtin-bswap-8.c
===================================================================
--- gcc.dg/builtin-bswap-8.c	(revision 199343)
+++ gcc.dg/builtin-bswap-8.c	(working copy)
@@ -1,7 +1,7 @@ 
 /* { dg-do compile { target arm*-*-* alpha*-*-* i?86-*-* powerpc*-*-* rs6000-*-* x86_64-*-* s390*-*-* } } */
 /* { dg-require-effective-target stdint_types } */
-/* { dg-options "-O -fdump-rtl-combine" } */
-/* { dg-options "-O -fdump-rtl-combine -march=z900" { target s390-*-* } } */
+/* { dg-options "-O2 -fdump-rtl-combine" } */
+/* { dg-options "-O2 -fdump-rtl-combine -march=z900" { target s390-*-* } } */
 
 #include <stdint.h>
 
Index: gcc.dg/builtin-bswap-9.c
===================================================================
--- gcc.dg/builtin-bswap-9.c	(revision 199343)
+++ gcc.dg/builtin-bswap-9.c	(working copy)
@@ -1,7 +1,7 @@ 
 /* { dg-do compile { target arm*-*-* alpha*-*-* ia64*-*-* x86_64-*-* s390x-*-* powerpc*-*-* rs6000-*-* } } */
 /* { dg-require-effective-target stdint_types } */
 /* { dg-require-effective-target lp64 } */
-/* { dg-options "-O -fdump-rtl-combine" } */
+/* { dg-options "-O2 -fdump-rtl-combine" } */
 
 #include <stdint.h>