This change makes use of the llvm.vector.extract intrinsic to avoid
going through memory when performing bitcasts between vector-length
agnostic types and vector-length specific types.
Depends on D91362
Paths
| Differential D92761
[clang][AArch64][SVE] Avoid going through memory for VLAT <-> VLST casts ClosedPublic Authored by joechrisellis on Dec 7 2020, 6:37 AM.
Details Summary This change makes use of the llvm.vector.extract intrinsic to avoid Depends on D91362
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 7 2020, 6:37 AM Comment Actions Left a couple of nits but mostly LGTM, cheers
This revision is now accepted and ready to land.Dec 15 2020, 10:36 AM Comment Actions Address @c-rhodes's comments.
This revision was landed with ongoing or failed builds.Dec 16 2020, 4:24 AM Closed by commit rGdad07baf123e: [clang][AArch64][SVE] Avoid going through memory for VLAT <-> VLST casts (authored by joechrisellis). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 312173 clang/lib/CodeGen/CGExprScalar.cpp
clang/test/CodeGen/aarch64-sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.c
clang/test/CodeGen/attr-arm-sve-vector-bits-bitcast.c
clang/test/CodeGen/attr-arm-sve-vector-bits-call.c
clang/test/CodeGen/attr-arm-sve-vector-bits-cast.c
clang/test/CodeGen/attr-arm-sve-vector-bits-codegen.c
clang/test/CodeGen/attr-arm-sve-vector-bits-globals.c
llvm/include/llvm/IR/IRBuilder.h
|
nit: it might be worth adding a comment stating we need to keep this around for casting between predicates, until we figure out a better way of doing that. The insert/extract intrinsics you've added require the element type to be identical and we represent fixed predicates with i8, whereas scalable predicates are represented as <vscale x 16 x i1>.