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. > but the base is converted to sizetype without also > converting the step to a non-pointer type. Later in the compilation this > results in a PLUS_EXPR with a pointer argument, which is invalid gimple. > > The patch fixes the problem by ensuring that the step is converted at > the same point the base is. This seems like it ought to be correct. If > the step is not a pointer type then no conversion occurs. > > I don't really understand why I only see this issue on amdgcn, but it > might be because the pointer in question is in a MASK_LOAD which is > perhaps not that commonly used? > > I've tested this on amdgcn, and done a full bootstrap and test on x86_64 > also. > > OK to commit? > > Thanks > > Andrew