This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Reduce VL of splat instructions used to feed stores
Needs ReviewPublic

Authored by reames on Nov 11 2022, 11:30 AM.

Details

Summary

If we splat a value into N lanes, and then the only use of the resulting vector is a store of M lanes, we can reduce the size of the splat to min(M,N). Lanes between M and N (if M < N) can't be observed.

In principle, reducing the width of the splat could cause an additional VL toggle, but this appears not to happen much in practice.

This is a carved down version D130895. The intention of this patch is to provide a base from which complexity of that patch can be added upon with incremental review.

Diff Detail