[PATCH] D155551: [PoC][RISCV] Use scalar register for fixed-length vectors
Wang Pengcheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 18 00:14:33 PDT 2023
wangpc created this revision.
wangpc added reviewers: asb, reames, craig.topper, kito-cheng, zixuan-wu.
Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
wangpc requested review of this revision.
Herald added subscribers: llvm-commits, eopXD, MaskRay.
Herald added a project: LLVM.
So that we can vectorize some loops with small element size.
For small vectors like v4i8, v8i8, v4i16, etc., they can be fit in
a whole scalar register.
I don't know if this is the right way to go and no other target
has done something like this. The changes seem to be intrusive, and
we have a lot of works to do if we want go further.
Related discussion:
- https://discourse.llvm.org/t/freertos-queue-much-slower-on-riscv-when-compiled-with-llvm-rather-than-gcc
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D155551
Files:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVInstrInfo.td
llvm/lib/Target/RISCV/RISCVRegisterInfo.td
llvm/lib/Target/RISCV/RISCVSubtarget.h
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
llvm/test/CodeGen/RISCV/vectorization-scalar-register/memcpy.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155551.541345.patch
Type: text/x-patch
Size: 11191 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230718/0ebcb36a/attachment.bin>
More information about the llvm-commits
mailing list