[cfe-commits] r111612 - /cfe/trunk/lib/CodeGen/CGBuiltin.cpp
Chris Lattner
clattner at apple.com
Fri Aug 20 09:35:34 PDT 2010
On Aug 19, 2010, at 8:36 PM, Bob Wilson wrote:
> Author: bwilson
> Date: Thu Aug 19 22:36:08 2010
> New Revision: 111612
>
> URL: http://llvm.org/viewvc/llvm-project?rev=111612&view=rev
> Log:
> Translate NEON vmovl intrinsics to zero/sign-extend operations.
Hi Bob,
If the builtin directly corresponds to LLVM IR constructs, it should be removed. Clang's arm_neon.h file should just implement the arm function in terms of the IR ops.
-Chris
>
> Modified:
> cfe/trunk/lib/CodeGen/CGBuiltin.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=111612&r1=111611&r2=111612&view=diff
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Thu Aug 19 22:36:08 2010
> @@ -1377,8 +1377,9 @@
> Int = usgn ? Intrinsic::arm_neon_vmlslu : Intrinsic::arm_neon_vmlsls;
> return EmitNeonCall(CGM.getIntrinsic(Int, &Ty, 1), Ops, "vmlsl", splat);
> case ARM::BI__builtin_neon_vmovl_v:
> - Int = usgn ? Intrinsic::arm_neon_vmovlu : Intrinsic::arm_neon_vmovls;
> - return EmitNeonCall(CGM.getIntrinsic(Int, &Ty, 1), Ops, "vmovl");
> + if (usgn)
> + return Builder.CreateZExt(Ops[0], Ty, "vmovl");
> + return Builder.CreateSExt(Ops[0], Ty, "vmovl");
> case ARM::BI__builtin_neon_vmovn_v:
> return EmitNeonCall(CGM.getIntrinsic(Intrinsic::arm_neon_vmovn, &Ty, 1),
> Ops, "vmovn");
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list