Message ID | 20181211171500.GA12380@tucnak |
---|---|
State | New |
Headers | show |
Series | Fix up split-path-11.c testcase (Re: [committed] [PR tree-optimization/80520] Throttle path splitting slightly.) | expand |
On 12/11/18 10:15 AM, Jakub Jelinek wrote: > On Mon, Dec 10, 2018 at 09:56:46PM -0700, Jeff Law wrote: >> commit d90b13427e4940adabc4320c68ca88513dee2eef >> Author: Jeff Law <law@redhat.com> >> Date: Mon Dec 10 21:46:41 2018 -0700 >> >> PR tree-optimization/80520 >> * gimple-ssa-split-paths.c (is_feasible_trace): Recognize half >> diamonds that are likely if convertable. >> >> * gcc.dg/tree-ssa/split-path-5.c: Update expected output. >> * gcc.dg/tree-ssa/split-path-11.c: New test. >> >> --- /dev/null >> +++ b/gcc/testsuite/gcc.dg/tree-ssa/split-path-11.c >> @@ -0,0 +1,14 @@ >> +/* { dg-do compile } */ >> +/* { dg-options "-O2 -fsplit-paths -fdump-tree-split-paths-details -w" } */ >> + >> +void foo(unsigned long *M) >> +{ >> + for (unsigned long k = 0; k < 227; ++k) >> + { >> + unsigned long y = >> + ((M[k] & 0xffffffff80000000) | (M[k + 1] & 0x7fffffff)); >> + M[k] = (M[k + 397] ^ (y >> 1) ^ ((y & 1) ? 2567483615 : 0)); >> + } >> +} >> + >> +/* { dg-final { scan-tree-dump-times "join point for if-convertable half-diamond" 1 "split-paths" } } */ > > This testcase fails on ILP32 targets like i?86-linux*. > > Fixed thusly, ok for trunk? > > 2018-12-11 Jakub Jelinek <jakub@redhat.com> > > PR tree-optimization/80520 > * gcc.dg/tree-ssa/split-path-11.c (foo): Make the test ilp32 target > clean. Yes. Sorry for the testing noise. jeff
--- gcc/testsuite/gcc.dg/tree-ssa/split-path-11.c.jj 2018-12-11 11:02:09.009065808 +0100 +++ gcc/testsuite/gcc.dg/tree-ssa/split-path-11.c 2018-12-11 18:10:33.811169259 +0100 @@ -1,13 +1,13 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fsplit-paths -fdump-tree-split-paths-details -w" } */ -void foo(unsigned long *M) +void foo(unsigned long long *M) { - for (unsigned long k = 0; k < 227; ++k) + for (unsigned long long k = 0; k < 227; ++k) { - unsigned long y = - ((M[k] & 0xffffffff80000000) | (M[k + 1] & 0x7fffffff)); - M[k] = (M[k + 397] ^ (y >> 1) ^ ((y & 1) ? 2567483615 : 0)); + unsigned long long y = + ((M[k] & 0xffffffff80000000ULL) | (M[k + 1] & 0x7fffffffULL)); + M[k] = (M[k + 397] ^ (y >> 1) ^ ((y & 1) ? 2567483615ULL : 0)); } }