HomePhabricator

[DAG] Add BuildVectorSDNode::getRepeatedSequence helper to recognise multi…

Authored by RKSimon on Oct 24 2020, 4:23 AM.

Description

[DAG] Add BuildVectorSDNode::getRepeatedSequence helper to recognise multi-element splat patterns

Replace the X86 specific isSplatZeroExtended helper with a generic BuildVectorSDNode method.

I've just used this to simplify the X86ISD::BROADCASTM lowering so far (and remove isSplatZeroExtended), but we should be able to use this in more places to lower to complex broadcast patterns.

Differential Revision: https://reviews.llvm.org/D87930