[lno] [RFC] if-conversion and auto vectorizer
Diego Novillo
dnovillo@redhat.com
Tue Mar 16 00:07:00 GMT 2004
On Mon, 2004-03-15 at 19:01, Devang Patel wrote:
> > if (test)
> > T_1 = *p;
> > else
> > T_2 = 0;
> > T_3 = PHI (T_1, T_2);
> >
> > cannot be transformed to
> >
> > T_1 = *p;
> > T_3 = test ? T_1 : 0;
> > unless you can show either that (1) dereferencing *p will never trap,
> > or (2) some other dereference of *p dominates this test. Similar
> > examples can be shown with arithmetic such as divide, or fp arithmetic
> > without -ffast-math (i.e. when we can't discount NaNs).
>
> We also need to consider possible side effects of 'test' itself.
>
Not in GIMPLE. If 'test' is used in a predicate like the above, it
should be a GIMPLE scalar.
Diego.
More information about the Gcc
mailing list