[PATCH] D70484: [ARM,MVE] Add an InstCombine rule permitting VPNOT.
Simon Tatham via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 20 03:04:36 PST 2019
simon_tatham created this revision.
simon_tatham added reviewers: ostannard, MarkMurrayARM, dmgreen.
Herald added subscribers: llvm-commits, hiraditya, kristof.beyls.
Herald added a project: LLVM.
If a user writing C code using the ACLE MVE intrinsics generates a
predicate and then complements it, then the resulting IR will use the
`pred_v2i` IR intrinsic to turn some `<n x i1>` vector into a 16-bit
integer; complement that integer; and convert back. This will generate
machine code that moves the predicate out of the `P0` register,
complements it in an integer GPR, and moves it back in again.
This InstCombine rule replaces `i2v(~v2i(x))` with a direct complement
of the original predicate vector, which we can already instruction-
select as the VPNOT instruction which complements P0 in place.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70484
Files:
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/CodeGen/Thumb2/mve-vpt-from-intrinsics.ll
llvm/test/Transforms/InstCombine/ARM/mve-v2i2v.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70484.230222.patch
Type: text/x-patch
Size: 7051 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191120/be8d9d61/attachment.bin>
More information about the llvm-commits
mailing list