This is an archive of the discontinued LLVM Phabricator instance.

[ARM][ParallelDSP] SExt mul for accumulation
ClosedPublic

Authored by samparker on Aug 30 2019, 1:31 AM.

Details

Summary

For any unpaired muls, we accumulate them as an input to the reduction. Check the type of the mul and perform a sext if the existing accumlator input type is not the same.

Diff Detail

Event Timeline

samparker created this revision.Aug 30 2019, 1:31 AM

Could you describe the complete flow here? If getAccumulator() returns a value, I think I see how it works; the type of that value is the type of the final accumulator, and you need to sign-extend multiplies to match that type. If getAccumulator() returns null, I don't see how this is supposed to work; it looks like the code arbitrarily decides the accumulator should be 32 bits.

samparker updated this revision to Diff 218305.Sep 2 2019, 1:49 AM

Bah! You're right, it doesn't make sense and there wasn't a test for it... I'm now querying the root for the type and creating the right zero accumulator input if needed. Added more 64-bit tests too.

efriedma accepted this revision.Sep 3 2019, 3:28 PM

LGTM

This revision is now accepted and ready to land.Sep 3 2019, 3:28 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 4 2019, 1:43 AM