On Thu, Jan 30, 2020 at 3:09 PM Andrew Stubbs <a...@codesourcery.com> wrote: > > On 30/01/2020 13:49, Richard Biener wrote: > > On Thu, Jan 30, 2020 at 2:04 PM Bin.Cheng <amker.ch...@gmail.com> wrote: > >> > >> On Thu, Jan 30, 2020 at 8:53 PM Andrew Stubbs <a...@codesourcery.com> > >> wrote: > >>> > >>> On 29/01/2020 08:24, Richard Biener wrote: > >>>> On Tue, Jan 28, 2020 at 5:53 PM Andrew Stubbs <a...@codesourcery.com> > >>>> wrote: > >>>>> > >>>>> This patch fixes an ICE compiling fast-math-pr55281.c for amdgcn. > >>>>> > >>>>> The problem is that an "iv" is created in which both base and step are > >>>>> pointer types, > >>>> > >>>> How did you get a POINTER_TYPE step? That's where the issue lies > >>>> I think. > >>> > >>> It can come from "find_inv_vars_cb": > >>> > >>> set_iv (idata, op, op, build_int_cst (TREE_TYPE (op), 0), true); > >> > >> This is recording invariant with zero step. It seems we are using > >> wrong type building the zero-step. How about detecting that op has > >> pointer type and using integer type here? > > > > that sounds like a good idea. > > How about this? > > I've only tested it on the one testcase, so far, but it works for that. > > OK to commit (following a full test)?
OK. Richard. > Andrew