Skip to content

[X86] Remove LowerToHorizontalOp and update test coverage #143000

Open
@RKSimon

Description

@RKSimon

LowerToHorizontalOp is a x86 DAG lowering that tries to vectorize horizontal add/sub code into SSE HADD/SUB vector instructions.

Its also a lot of X86ISelLowering code that is almost certainly unnecessary now.

SLP + VectorCombine between them should be handling all of this, so the backend is very unlikely to encounter real-world scalar patterns anymore.

So, this task involves:

  • Disable LowerToHorizontalOp
  • Review all CodeGen/X86 test changes
  • Convert the changed CodeGen/X86 tests into similar PhaseOrdering/X86 tests to track the vectorized IR (for the various slow/fast SSE/AVX targets)
  • Replace the CodeGen/X86 test coverage with the real vectorized IR
  • Remove LowerToHorizontalOp and all its support methods
  • Handle any CodeGen regressions (maybe a cost model, transform or backend fix)

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions