Hi,
> >>> It seems like folding undef/X to undef isn't safe either though,
here is my understanding of how to fold undef. I hope it clarifies
this confusing area. Of course, I could be confused myself but I
hope not :)
(1) When is it OK to fold "y=foo(undef)" to "y=undef"? I claim that
it is
Hi,
> > It seems like folding undef/X to undef isn't safe either though, with
> > the way it sounds like undef is intended to work. This code:
> >
> > %x = udiv i32 undef, %intmax
> > %y = udiv i32 %x, 2
> >
> > will always set %y to 0. Maybe instcombine can fold the second
> > udiv by looking