This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Correct the EvenSrc/OddSrc computation in isInterleaveShuffle.
ClosedPublic

Authored by craig.topper on Mar 30 2023, 1:50 PM.

Details

Summary

StartIndexes[0] Tells exactly which source element is in element 0,
the even source. Nothing needs to be swapped.

Since we're dealing with power of 2 vector lengths, StartIndexes[0]
is almost always even so the condition here was never true. The
exception is when we're interleaving two 1 element vectors. In that
case StartIndexes[0] could be 1.

We recently hit a failure from this on a pulldown. I don't have
the reduced reproducer yet and my naive attempts at making an
interleave of 1 element vectors produces a slideup instead so don't
go through this path.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 30 2023, 1:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2023, 1:50 PM
craig.topper requested review of this revision.Mar 30 2023, 1:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2023, 1:50 PM
luke accepted this revision.Mar 30 2023, 2:02 PM
This revision is now accepted and ready to land.Mar 30 2023, 2:02 PM