support for all AltiVec functions except those with bool/pixel arguments

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

support for all AltiVec functions except those with bool/pixel arguments

Anton Yartsev
The patch enables support for all the AltiVec functions from the PIM
except those with bool/pixel arguments. Pleas review.
Attach also contains C++ variant of test.

The patch is equivalent to those i have sent a few weeks ago
(http://thread.gmane.org/gmane.comp.compilers.clang.devel/8527) but it
was probably lost

--
Anton


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

AltiVec_func_except_pixel_bool.patch (328K) Download Attachment
builtins-ppc-altivec.cpp (75K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: support for all AltiVec functions except those with bool/pixel arguments

Chris Lattner

On Jun 10, 2010, at 3:31 PM, Anton Yartsev wrote:

> The patch enables support for all the AltiVec functions from the PIM except those with bool/pixel arguments. Pleas review.
> Attach also contains C++ variant of test.
>
> The patch is equivalent to those i have sent a few weeks ago (http://thread.gmane.org/gmane.comp.compilers.clang.devel/8527) but it was probably lost

This patch looks great.  One minor comment:

+  case PPC::BI__builtin_altivec_lvsr:
+  {
+    Ops[1] = Builder.CreateBitCast(Ops[1], llvm::Type::getInt8PtrTy(VMContext));
+
+    Ops[0] = !isa<Constant>(Ops[0]) || !cast<Constant>(Ops[0])->isNullValue()
+             ? Builder.CreateGEP(Ops[1], Ops[0], "tmp") : Ops[1];

There is no need to special case null here.  Please just unconditionally use 'Builder.CreateGEP(Ops[1], Ops[0], "tmp")'.

With that simplification, please apply!

-Chris



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: support for all AltiVec functions except those with bool/pixel arguments

Anton Korobeynikov
> With that simplification, please apply!
Applied with this fix in r106387

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev