[RISCV] Teach RISCVGatherScatterLowering to handle more complex recurrence start...
authorCraig Topper <craig.topper@sifive.com>
Tue, 4 Jan 2022 18:08:03 +0000 (10:08 -0800)
committerCraig Topper <craig.topper@sifive.com>
Tue, 4 Jan 2022 18:13:34 +0000 (10:13 -0800)
commitdf2e728b77510da33cf3822eae4d66531eeed518
tree9d334b06238d17f5f6076f9add51fe6f531afc60
parente1e74f6cd6ce41ce8303a5a91f29736808fccc36
[RISCV] Teach RISCVGatherScatterLowering to handle more complex recurrence start values.

Previously we only recognized strided loads/store when the initial
value for the phi was a strided constant vector.

This patch extends the support to a strided_constant added to a
splatted value. The rewritten loop will add the splat value to the
first element of the strided constant vector to use as the scalar
start value. The stride is unaffected.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D115958
llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
llvm/test/CodeGen/RISCV/rvv/fixed-vector-strided-load-store.ll