This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombine] Prevent illegal ISD::SPLAT_VECTOR operations post legalisation.
ClosedPublic

Authored by paulwalker-arm on Mar 1 2022, 9:15 AM.

Details

Summary

When triggered during operation legalisation the affected combine
generates a splat_vector that when custom lowered for SVE fixed
length code generation, results in the original precombine sequence
and thus we enter a legalisation/combine hang.

NOTE: The patch contains no tests because I observed this issue only when combined with other work that might never become public. The current way AArch64 lowers ISD::SPLAT_VECTOR meant a specific test was not possible so I'm hoping the DAGCombiner fix can be seen as obvious. The AArch64ISelLowering change is requirted to maintain existing code quality.

Diff Detail

Event Timeline

paulwalker-arm created this revision.Mar 1 2022, 9:15 AM
paulwalker-arm requested review of this revision.Mar 1 2022, 9:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2022, 9:15 AM
efriedma accepted this revision.Mar 2 2022, 3:04 PM

LGTM

I agree the target-independent bit is obviously correct. The target-specific bit is ugly, but I don't have a better suggestion.

This revision is now accepted and ready to land.Mar 2 2022, 3:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2022, 3:04 PM
This revision was landed with ongoing or failed builds.Mar 4 2022, 3:56 AM
This revision was automatically updated to reflect the committed changes.