This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Match splatted load to scalar load + splat. Form strided load during isel.
ClosedPublic

Authored by craig.topper on Apr 22 2021, 11:23 PM.

Details

Summary

This modifies my previous patch to push the strided load formation
to isel. This gives us opportunity to fold the splat into a .vx
operation first. Using a scalar register and a .vx operation reduces
vector register pressure which can be important for larger LMULs.

If we can't fold the splat into a .vx operation, then it can make
sense to use a strided load to free up the vector arithmetic
ALU to do actual arithmetic rather than tying it up with vmv.v.x.

Diff Detail