[PATCH] D70132: [ARM,MVE] Use VMOV.{S8,S16} for sign-extended extractelement.
Simon Tatham via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 12 10:00:27 PST 2019
simon_tatham created this revision.
simon_tatham added reviewers: SjoerdMeijer, dmgreen, ostannard.
Herald added subscribers: llvm-commits, hiraditya, kristof.beyls.
Herald added a project: LLVM.
MVE includes instructions that extract an 8- or 16-bit lane from a
vector and sign-extend it into the output 32-bit GPR. `ARMInstrMVE.td`
already included isel patterns to select those instructions in
response to the `ARMISD::VGETLANEs` selection-DAG node type. But
`ARMISD::VGETLANEs` was never actually generated, because the code
that creates it was conditioned on NEON only.
It's an easy fix to enable the same code for integer MVE, and now IR
that sign-extends the result of an extractelement (whether explicitly
or as part of the function call ABI) will use `vmov.s8` instead of
`vmov.u8` followed by `sxtb`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70132
Files:
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/Thumb2/mve-extractelt.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70132.228912.patch
Type: text/x-patch
Size: 3701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191112/ce1c0b46/attachment.bin>
More information about the llvm-commits
mailing list