[AArch64][SVE] Improve codegen for dupq SVE ACLE intrinsics
authorBradley Smith <bradley.smith@arm.com>
Thu, 20 May 2021 10:13:34 +0000 (11:13 +0100)
committerBradley Smith <bradley.smith@arm.com>
Mon, 7 Jun 2021 11:21:38 +0000 (12:21 +0100)
commit60c9b5f35caeb555f66d261bf5a657ab02a35fef
tree1dfc6717d848a362b5ca5a5d69f2ae759a903602
parentfe0befb123e4a727c3c883845c9d3bfe75d831c7
[AArch64][SVE] Improve codegen for dupq SVE ACLE intrinsics

Use llvm.experimental.vector.insert instead of storing into an alloca
when generating code for these intrinsics. This defers the codegen of
the generated vector to instruction selection, allowing existing
shufflevector style optimizations to apply.

Additionally, introduce a new target transform that can recognise fixed
predicate patterns in the svbool variants of these intrinsics.

Differential Revision: https://reviews.llvm.org/D103082
clang/lib/CodeGen/CGBuiltin.cpp
clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq-bfloat.c
clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq.c
clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq_const.c [new file with mode: 0644]
llvm/include/llvm/IR/IntrinsicsAArch64.td
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/test/Transforms/InstCombine/AArch64/sve-intrinsic-opts-cmpne.ll [new file with mode: 0644]