[PATCH] D118215: [RISCV] Add support for matching vwmulsu from fixed vectors.
Chenbing.Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 25 23:43:59 PST 2022
Chenbing.Zheng created this revision.
Chenbing.Zheng added reviewers: craig.topper, arcbbb, HsiangKai, frasercrmck, benshi001.
Chenbing.Zheng added a project: LLVM.
Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
Chenbing.Zheng requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, jacquesguan, MaskRay.
According to riscv-v-spec-1.0, widening signed(vs2)-unsigned integer multiply
vwmulsu.vv vd, vs2, vs1, vm # vector-vector
vwmulsu.vx vd, vs2, rs1, vm # vector-scalar
It is worth noting that signed op is only for vs2.
For vwmulsu.vv, we can swap two ops, and don't care which is sign extension,
but for vwmulsu.vx signExt can not be a vector extended from scalar (rs1).
I specifically added two functions ending with _swap in the test case.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D118215
Files:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
llvm/test/CodeGen/RISCV/rvv/fixed-vector-vwmulsu.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118215.403145.patch
Type: text/x-patch
Size: 28057 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220126/6f484e94/attachment.bin>
More information about the llvm-commits
mailing list