This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Fix zero element TBL indices
ClosedPublic

Authored by dmgreen on May 18 2022, 2:43 AM.

Details

Summary

A TBL instruction will fill out-of-range values with 0's, something used in D121139 to turn tbl2 with a zero input into tbl1s. This works OK for v16i8, but for v8i8 the input is still treated as a v16i8, so "out-of-range" values (like a lane index of 8) would end up loading values from the top half of the input register. Clean this up by detecting the out of range values and making sure they really use out of range values. There is a fix for swapped indices of 64bit input vectors too, which could be incorrectly adjusted if the zerovector was the first operand.

Fixes #55545

Diff Detail

Event Timeline

dmgreen created this revision.May 18 2022, 2:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2022, 2:43 AM
dmgreen requested review of this revision.May 18 2022, 2:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2022, 2:43 AM
This revision is now accepted and ready to land.May 19 2022, 3:57 AM
This revision was landed with ongoing or failed builds.May 19 2022, 5:54 AM
This revision was automatically updated to reflect the committed changes.