This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Propagate BB predicates in ipa-inline-analysis


Jan Hubicka wrote:

> 	(edge_execution_predicate): Rewrite as...
> 	(set_cond_stmt_execution_predicate): ... this function; handle
> 	__builtin_constant_p.

This causes ICEs when building recent Linux kernels with the
CONFIG_TRACE_BRANCH_PROFLING option.  This reduced test case:

static inline __attribute__((always_inline)) int f (unsigned int n, unsigned int size)
{
 return (__builtin_constant_p (size != 0 && n > ~0 / size)
         ? !!(size != 0 && n > ~0 / size)
         : ({ static unsigned int count[2] = { 0, 0 };
              int r = !!(size != 0 && n > ~0 / size);
              count[r]++;
              r; }));
}

int g (unsigned int size)
{
 return f (size / 4096, 4);
}

built with -O2 (on i386) on current mainline results in:

/home/uweigand/test.i:15:1: internal compiler error: tree check: expected ssa_name, have integer_cst in set_cond_stmt_execution_predicate, at ipa-inline-analysis.c:1190

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]