This is an archive of the discontinued LLVM Phabricator instance.

[ARM][ParallelDSP] Fix for sext input
ClosedPublic

Authored by samparker on Sep 5 2019, 4:20 AM.

Details

Summary

The incoming accumulator value can be discovered through a sext, in which case there will be a mismatch between the input and the result. So sign extend the accumulator input if we're performing a 64-bit mac.

Diff Detail

Event Timeline

samparker created this revision.Sep 5 2019, 4:20 AM
efriedma added inline comments.Sep 5 2019, 12:35 PM
lib/Target/ARM/ARMParallelDSP.cpp
137

Is this really the right place to do this? At this point, we still aren't sure we're going to transform the code. You could instead just do this after you call getAccumulator() in InsertParallelMACs.

test/CodeGen/ARM/ParallelDSP/blocks.ll
1

Why -dce?

samparker marked 2 inline comments as done.Sep 6 2019, 1:24 AM
samparker added inline comments.
lib/Target/ARM/ARMParallelDSP.cpp
137

good point.

test/CodeGen/ARM/ParallelDSP/blocks.ll
1

Just because it makes it easier for me to write the tests and read the output.

samparker updated this revision to Diff 219045.Sep 6 2019, 1:31 AM

Moved the fix to where all the accumulator handling is performed.

This revision is now accepted and ready to land.Sep 6 2019, 12:45 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 9 2019, 1:37 AM