Skip to content
Commit b7166e25 authored by Craig Topper's avatar Craig Topper
Browse files

[RISCV] Combine extract_vector_elt followed by VFMV_S_F_VL.

If we're extracting an element and inserting into a undef vector
with the same number of elements, we can use the original vector.

This pattern occurs around reductions that have been cascaded
together.

This can be generalized to wider/narrow vectors by using
insert_subvector/extract_subvector, but we don't have lit tests
for that case currently.

We can also support non-undef before by using a slide or vmv.v.v

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D142264
parent 002b190d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment