This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Fix INSERT/EXTRACT_SUBVECTOR on fractional LMUL types
ClosedPublic

Authored by frasercrmck on Feb 26 2021, 7:23 AM.

Details

Summary

This patch fixes a bug where the lowering for INSERT_SUBVECTOR and
EXTRACT_SUBVECTOR would insist on first extracting a register-aligned
LMUL1 vector type before perfoming the slide up/down. This was even if
the vector was a fractional LMUL type, in which case the aligned
EXTRACT_SUBVECTOR was invalid.

This issue only occurred for scalable vector types, but a variety of
tests for both scalable and fixed-length vectors have been added to
ensure this does not regress in the future.

Diff Detail