Thanks for all the help! I'll get this tested and committed to trunk today.
On Wed, 2012-01-11 at 13:11 +0100, Jakub Jelinek wrote: > On Wed, Jan 11, 2012 at 10:57:28AM +0100, Richard Guenther wrote: > > > + tree fndecl; > > > + > > > + if (!is_gimple_call (stmt)) > > > + return; > > > + > > > + fndecl = gimple_call_fndecl (stmt); > > > + > > > + if (fndecl > > > + && TREE_CODE (fndecl) == FUNCTION_DECL > > > > Not needed. > > > > > + && DECL_BUILT_IN (fndecl) > > > > DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL > > > > > + /* At the moment, __builtin_constant_p is the only forbidden > > > + predicate function call (see PR49642). */ > > > + && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CONSTANT_P) > > Or better yet > if (!gimple_call_builtin_p (stmt, BUILT_IN_CONSTANT_P)) > return; > instead of all the above. > > Jakub >