[PATCH] D76078: [AArch64][SVE] Add a pass for SVE intrinsic optimisations
Kerry McLaughlin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 12 10:18:32 PDT 2020
kmclaughlin created this revision.
kmclaughlin added reviewers: sdesmalen, andwar, efriedma, cameron.mcinally, c-rhodes.
Herald added subscribers: danielkiss, psnobl, rkruppe, hiraditya, kristof.beyls, tschuett, mgorny.
Herald added a reviewer: rengolin.
Herald added a project: LLVM.
Creates the SVEIntrinsicOpts pass. In this patch, the pass tries
to remove unnecessary reinterpret intrinsics which convert to
and from svbool_t (llvm.aarch64.sve.convert.[to|from].svbool)
For example, the reinterprets below are redundant:
%1 = call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> %a)
%2 = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %1)
The pass also looks for ptest intrinsics and phi instructions where
the operands are being needlessly converted to and from svbool_t.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76078
Files:
llvm/lib/Target/AArch64/AArch64.h
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
llvm/lib/Target/AArch64/CMakeLists.txt
llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
llvm/test/CodeGen/AArch64/O3-pipeline.ll
llvm/test/CodeGen/AArch64/sve-intrinsic-opts-ptest.ll
llvm/test/CodeGen/AArch64/sve-intrinsic-opts-reinterpret.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76078.249967.patch
Type: text/x-patch
Size: 24098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200312/46566a9d/attachment-0001.bin>
More information about the cfe-commits
mailing list