[PATCH] D79721: [Clang][AArch64] Capturing proper pointer alignment for Neon vld1 intrinsicts
Lucas Prates via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 2 09:52:37 PDT 2020
pratlucas marked 5 inline comments as done.
pratlucas added inline comments.
================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:10334
Ops[0] = Builder.CreateBitCast(Ops[0], llvm::PointerType::getUnqual(VTy));
- auto Alignment = CharUnits::fromQuantity(
- BuiltinID == NEON::BI__builtin_neon_vld1_v ? 8 : 16);
- return Builder.CreateAlignedLoad(VTy, Ops[0], Alignment);
+ return Builder.CreateAlignedLoad(VTy, Ops[0], PtrOp0.getAlignment());
}
----------------
efriedma wrote:
> Might as well just `return Builder.CreateLoad(VTy, PtrOp0);`
The bitcast of the pointer for the proper vector type is required prior to the load, so `Builder.CreateLoad` may not be the best fit here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79721/new/
https://reviews.llvm.org/D79721
More information about the cfe-commits
mailing list