[PATCH] D78750: [SveEmitter] Add builtins for svdupq and svdupq_lane
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 1 18:25:27 PDT 2020
efriedma added inline comments.
================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:8054
+
+ Value *Alloca = Builder.CreateAlloca(EltTy, Builder.getInt32(NumOpnds));
+ for (unsigned I = 0; I < NumOpnds; ++I)
----------------
Please use something like `CreateTempAlloca(llvm::ArrayType::get(EltTy, NumOpnds), CharUnits::fromQuantity(16))`.
(In particular, the way you've written it, the code allocates stack memory dynamically. Might want to add a test with some control flow to demonstrate that you're putting the alloca into the entry block.)
================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:8058
+ IsBoolTy ? Builder.CreateZExt(Ops[I], EltTy) : Ops[I],
+ Builder.CreateGEP(Alloca, Builder.getInt32(I)));
+
----------------
Builder.getInt64().
================
Comment at: clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq.c:257
+ // CHECK: %[[BASE:.*]] = getelementptr inbounds [4 x float], [4 x float]* %[[ALLOCA]], i64 0, i64 0
+ // CHECK: store float %x0, float* %[[BASE]]
+ // <assume other stores>
----------------
Please CHECK the alignment of all these operations.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78750/new/
https://reviews.llvm.org/D78750
More information about the cfe-commits
mailing list