[llvm-commits] [llvm] r154787 - /llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp

Hal Finkel hfinkel at anl.gov
Mon Apr 16 05:35:57 PDT 2012


On Sun, 15 Apr 2012 21:41:52 -0700
Bill Wendling <wendling at apple.com> wrote:

> On Apr 15, 2012, at 8:49 PM, Hal Finkel wrote:
> 
> > Author: hfinkel
> > Date: Sun Apr 15 22:49:42 2012
> > New Revision: 154787
> > 
> > URL: http://llvm.org/viewvc/llvm-project?rev=154787&view=rev
> > Log:
> > Simplify checking for pointer types in BBVectorize (this change was
> > suggested by Duncan).
> > 
> > Modified:
> >    llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
> > 
> > Modified: llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
> > URL:
> > http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp?rev=154787&r1=154786&r2=154787&view=diff
> > ==============================================================================
> > --- llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp (original)
> > +++ llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp Sun Apr 15
> > 22:49:42 2012 @@ -613,11 +613,8 @@ return false;
> > 
> >     if ((!Config.VectorizePointers || TD == 0)
> > -        && ((T1->isPointerTy() ||
> > -              (T1->isVectorTy() &&
> > T1->getScalarType()->isPointerTy())) ||
> > -            (T2->isPointerTy() ||
> > -              (T2->isVectorTy() &&
> > T2->getScalarType()->isPointerTy()))
> > -           ))
> > +        && (T1->getScalarType()->isPointerTy() ||
> 
> Hi Hal,
> 
> For future reference, we typically place the logical operators at the
> end of the line rather than the beginning:
> 
> 	if ((!Config.VectorizePointers || TD == 0) &&
>             ...
> 
> instead of
> 
> 	if ((!Config.VectorizePointers || TD == 0)
>  	    && ...

Thanks, I'll fix it.

 -Hal

> 
> -bw
> 
> > +            T2->getScalarType()->isPointerTy()))
> >       return false;
> > 
> >     if (T1->getPrimitiveSizeInBits() > Config.VectorBits/2 ||
> > 
> > 
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 



-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory




More information about the llvm-commits mailing list