On Mon, Aug 1, 2016 at 12:15 AM, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > Hi Richard, > The attached patch tries to fold strlen (s) eq/ne 0 to *s eq/ne 0 on GIMPLE. > I am not sure where was the ideal place to put this transform in and ended up > adding it to strlen_optimize_stmt(). > Does that look OK ?
I suspect it might be better in match.pd. > > I needed to add TODO_update_ssa to strlen pass, otherwise we hit the > following assert in execute_todo(): > if (flag_checking > && cfun > && need_ssa_update_p (cfun)) > gcc_assert (flags & TODO_update_ssa_any); Also you only need to update the virtual SSAs rather than a full SSA update. Thanks, Andrew > > Bootstrap+test in progress on x86_64-unknown-linux-gnu. > > Thanks, > Prathamesh