Skip to content

[DAG] Add SDPatternMatch m_SpecificScalarVT / m_SpecificVectorElementVT matchers #144477

Open
@RKSimon

Description

@RKSimon

We already have m_SpecificVT(EVT) which matches a specific requested value type, these helpers would be similar but would match the scalar/vector element component type:

  • Add SDPatternMatch::m_SpecificScalarVT matcher to match a source SDValue getScalarType result (i.e. either a scalar type or vector element element type)
  • Add SDPattcrnMatch::m_SpecificVectorElementVT matcher to check a source SDValue type is a vector and match its getVectorElementType result
  • Unit test coverage in SelectionDAGPatternMatchTest.cpp

Metadata

Metadata

Assignees

Labels

good first issuehttps://github.com/llvm/llvm-project/contributellvm:SelectionDAGSelectionDAGISel as well

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions