Hi! On Mon, Dec 10, 2018 at 09:56:46PM -0700, Jeff Law wrote: > Note that split-path-5 has the same basic structure. A half-diamond > with a single statement in the middle block that should be trivially > if-convertable if profitable. So I adjusted that testcase.
The split-path-5.c testcase now fails on powerpc64*, arm*, aarch64* etc. targets. When looking for the difference, I found out it is a -fsigned-char vs. -funsigned-char issue, on -funsigned-char targets we are simply compiling something quite different. The following patch fixes it, regtested on x86_64-linux (-m64/-m32) and tested with cross to aarch64-linux and powerpc64-linux. Ok for trunk? 2018-12-13 Jakub Jelinek <ja...@redhat.com> PR testsuite/88454 * gcc.dg/tree-ssa/split-path-5.c (__ctype_ptr__): Change type from const char * to const signed char *. (bmhi_init): Change pattern parameter's type the same. Use __builtin_strlen instead of undeclared strlen. --- gcc/testsuite/gcc.dg/tree-ssa/split-path-5.c.jj 2018-12-11 11:02:09.003065907 +0100 +++ gcc/testsuite/gcc.dg/tree-ssa/split-path-5.c 2018-12-13 08:36:26.457533278 +0100 @@ -1,16 +1,16 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fsplit-paths -fdump-tree-split-paths-details -w" } */ -const extern char *__ctype_ptr__; +const extern signed char *__ctype_ptr__; typedef unsigned char uchar; static int patlen; static int skip[(0x7f * 2 + 1) + 1]; static uchar *pat = ((void *) 0); void -bmhi_init (const char *pattern) +bmhi_init (const signed char *pattern) { int i, lastpatchar; - patlen = strlen (pattern); + patlen = __builtin_strlen (pattern); for (i = 0; i < patlen; i++) pat[i] = ( { Jakub