<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">CreateElementBitcast doesn’t seem to do what the name suggested. If you give it VTy, it doesn’t grab the element type to generate bitcast. Is this by-design? If so, I need to do this:</div><div class="">PtrOp0 = Builder.CreateElementBitCast(PtrOp0, VTy->getElementType()); </div><div class=""><br class=""></div><div class="">Steven</div><blockquote type="cite" class=""></blockquote><br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">On Sep 8, 2015, at 5:14 PM, Steven Wu <<a href="mailto:stevenwu@apple.com" class="">stevenwu@apple.com</a>> wrote:<br class="">Hi John<br class=""><br class="">It seems this commit breaks arm “vld1_lane” intrinsics. When emitting “vld1_lane” Ops[0] gets updated so PtrOp0 no longer have the same type as Ops[0].<br class=""></blockquote><br class="">Sorry about that.<br class=""><br class=""><blockquote type="cite" class="">Here a patch for the fix. Can you review it?<br class=""></blockquote><br class="">Slight tweak:<br class=""><br class=""><blockquote type="cite" class="">From daea3a26c6df07530407318e4f0819e6e2ff9aea Mon Sep 17 00:00:00 2001<br class="">From: Steven Wu <<a href="mailto:stevenwu@apple.com" class="">stevenwu@apple.com</a>><br class="">Date: Tue, 8 Sep 2015 17:10:25 -0700<br class="">Subject: [PATCH] Fix assertion when emiting NEON builtin<br class=""><br class="">---<br class="">lib/CodeGen/CGBuiltin.cpp | 1 +<br class="">1 file changed, 1 insertion(+)<br class=""><br class="">diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp<br class="">index 729c0a1..ed3f9f6 100644<br class="">--- a/lib/CodeGen/CGBuiltin.cpp<br class="">+++ b/lib/CodeGen/CGBuiltin.cpp<br class="">@@ -3772,6 +3772,7 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID,<br class="">   Ops[1] = Builder.CreateBitCast(Ops[1], Ty);<br class="">   Ty = llvm::PointerType::getUnqual(VTy->getElementType());<br class="">   Ops[0] = Builder.CreateBitCast(Ops[0], Ty);<br class=""></blockquote><br class="">Please remove these two lines and replace them with:<br class=""> PtrOp0 = Builder.CreateElementBitCast(PtrOp0, VTy);<br class=""><br class="">You then shouldn’t need this line:<br class=""><br class=""><blockquote type="cite" class="">+    PtrOp0 = Address(Ops[0], PtrOp0.getAlignment());<br class=""></blockquote><br class="">Thanks!<br class=""><br class="">John.<br class=""></blockquote></body></html>