This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Custom lower integer vector multify reduction
AbandonedPublic

Authored by jacquesguan on Feb 24 2022, 1:19 AM.

Details

Summary

Now, we will expand vecreduce_mul to several vector_shuffle and mul. But
it always computes with the whole vl which is not necessary. This patch
will use the active element as the vl to avoid redundant calculation.

Diff Detail

Event Timeline

jacquesguan created this revision.Feb 24 2022, 1:19 AM
jacquesguan requested review of this revision.Feb 24 2022, 1:19 AM

I don't think this is the right way to do this. The issue is marked by this FIXME in LowerVECTOR_SHUFFLE

// If we are doing a SLIDEDOWN+SLIDEUP, reduce the VL for the SLIDEDOWN.   
// FIXME: If we are only doing a SLIDEDOWN, don't reduce the VL as it      
// causes multiple vsetvlis in some test cases such as lowering            
// reduce.mul
jacquesguan abandoned this revision.Mar 8 2022, 12:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2022, 12:05 AM