32bit x86 CPUs won't natively support the FFS operation on a 64 bit type. Therefore, the switch-exp-transform-3.c test will always fail with a 32bit target. I'm fixing my mistake.
gcc/testsuite/ChangeLog: * gcc.target/i386/switch-exp-transform-3.c: Remove code testing that the exponential index transform is able to handle long long int. Signed-off-by: Filip Kastl <fka...@suse.cz> --- .../gcc.target/i386/switch-exp-transform-3.c | 51 +------------------ 1 file changed, 2 insertions(+), 49 deletions(-) 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..cd00071d0bc 100644 --- a/gcc/testsuite/gcc.target/i386/switch-exp-transform-3.c +++ b/gcc/testsuite/gcc.target/i386/switch-exp-transform-3.c @@ -4,8 +4,7 @@ /* Checks that the exponential index transformation is done for all these types of the index variable: - (unsigned) int - - (unsigned) long - - (unsigned) long long */ + - (unsigned) long */ int unopt_int(int bit_position) { @@ -99,50 +98,4 @@ int unopt_unsigned_long(unsigned long bit_position) } } -int unopt_long_long(long long bit_position) -{ - switch (bit_position) - { - case (1 << 0): - return 0; - case (1 << 1): - return 1; - case (1 << 2): - return 2; - case (1 << 3): - return 3; - case (1 << 4): - return 4; - case (1 << 5): - return 5; - case (1 << 6): - return 6; - default: - return 0; - } -} - -int unopt_unsigned_long_long(unsigned long long bit_position) -{ - switch (bit_position) - { - case (1 << 0): - return 0; - case (1 << 1): - return 1; - case (1 << 2): - return 2; - case (1 << 3): - return 3; - case (1 << 4): - return 4; - case (1 << 5): - return 5; - case (1 << 6): - return 6; - default: - return 0; - } -} - -/* { dg-final { scan-tree-dump-times "Applying exponential index transform" 6 "switchconv" } } */ +/* { dg-final { scan-tree-dump-times "Applying exponential index transform" 4 "switchconv" } } */ -- 2.45.2