Message ID | ZqogtnpUMqB_K10x@pc-76.home |
---|---|
State | New |
Headers | show |
Series | [v2] testsuite: Adjust switch-exp-transform-3.c for 32bit | expand |
On Wed, Jul 31, 2024 at 01:32:06PM +0200, Filip Kastl wrote: > Thanks for the feedback! Here is a second version of the patch. I've tested > this version with > > make check RUNTESTFLAGS="i386.exp=gcc.target/i386/switch-exp-transform-3.c --target_board='unix{-m32}'" > > and > > make check RUNTESTFLAGS="i386.exp=gcc.target/i386/switch-exp-transform-3.c" You can just use make check RUNTESTFLAGS="--target_board=unix\{-m32,-m64\} i386.exp=switch-exp-transform-3.c" > testsuite: Adjust switch-exp-transform-3.c for 32bit > > 32bit x86 CPUs won't natively support the FFS operation on a 64 bit > type. Therefore, I'm setting the long long int part of the > switch-exp-transform-3.c test to only execute with 64bit targets. > > gcc/testsuite/ChangeLog: > > * gcc.target/i386/switch-exp-transform-3.c: Set the long long > int test to only execute with 64bit targets. There should be just tab, not tab + 2 spaces before int test. Ok with that nit changed. Jakub
On Wed 2024-07-31 13:34:28, Jakub Jelinek wrote: > On Wed, Jul 31, 2024 at 01:32:06PM +0200, Filip Kastl wrote: > > Thanks for the feedback! Here is a second version of the patch. I've tested > > this version with > > > > make check RUNTESTFLAGS="i386.exp=gcc.target/i386/switch-exp-transform-3.c --target_board='unix{-m32}'" > > > > and > > > > make check RUNTESTFLAGS="i386.exp=gcc.target/i386/switch-exp-transform-3.c" > > You can just use > make check RUNTESTFLAGS="--target_board=unix\{-m32,-m64\} i386.exp=switch-exp-transform-3.c" > > > testsuite: Adjust switch-exp-transform-3.c for 32bit > > > > 32bit x86 CPUs won't natively support the FFS operation on a 64 bit > > type. Therefore, I'm setting the long long int part of the > > switch-exp-transform-3.c test to only execute with 64bit targets. > > > > gcc/testsuite/ChangeLog: > > > > * gcc.target/i386/switch-exp-transform-3.c: Set the long long > > int test to only execute with 64bit targets. > > There should be just tab, not tab + 2 spaces before int test. > Ok with that nit changed. > > Jakub > Ok, removed the 2 spaces and pushed the patch. Thanks, Filip Kastl
diff --git a/gcc/testsuite/gcc.target/i386/switch-exp-transform-3.c b/gcc/testsuite/gcc.target/i386/switch-exp-transform-3.c index c8fae70692e..64a7b146172 100644 --- a/gcc/testsuite/gcc.target/i386/switch-exp-transform-3.c +++ b/gcc/testsuite/gcc.target/i386/switch-exp-transform-3.c @@ -99,6 +99,8 @@ int unopt_unsigned_long(unsigned long bit_position) } } +#ifdef __x86_64__ + int unopt_long_long(long long bit_position) { switch (bit_position) @@ -145,4 +147,7 @@ int unopt_unsigned_long_long(unsigned long long bit_position) } } -/* { dg-final { scan-tree-dump-times "Applying exponential index transform" 6 "switchconv" } } */ +#endif + +/* { dg-final { scan-tree-dump-times "Applying exponential index transform" 4 "switchconv" { target ia32 } } } */ +/* { dg-final { scan-tree-dump-times "Applying exponential index transform" 6 "switchconv" { target { ! ia32 } } } } */