[llvm-branch-commits] [clang] fdebc12 - [Clang][AArch64] Capturing proper pointer alignment for Neon vld1 intrinsicts
Lucas Prates via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon May 11 04:03:27 PDT 2020
Author: Lucas Prates
Date: 2020-05-07T12:16:34+01:00
New Revision: fdebc127acffaae84c3768ae805f1f3e199f1fde
URL: https://github.com/llvm/llvm-project/commit/fdebc127acffaae84c3768ae805f1f3e199f1fde
DIFF: https://github.com/llvm/llvm-project/commit/fdebc127acffaae84c3768ae805f1f3e199f1fde.diff
LOG: [Clang][AArch64] Capturing proper pointer alignment for Neon vld1 intrinsicts
Added:
Modified:
clang/lib/CodeGen/CGBuiltin.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index dbe8826454dc..8b33890098bd 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -10283,9 +10283,8 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID,
}
case NEON::BI__builtin_neon_vld1_v:
case NEON::BI__builtin_neon_vld1q_v: {
+ auto Alignment = getNaturalPointeeTypeAlignment(E->getArg(0)->getType());
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);
}
case NEON::BI__builtin_neon_vst1_v:
More information about the llvm-branch-commits
mailing list