HomePhabricator

[x86] fix horizontal binop matching for 256-bit vectors (PR40243)

Description

[x86] fix horizontal binop matching for 256-bit vectors (PR40243)

This is a partial fix for:
https://bugs.llvm.org/show_bug.cgi?id=40243
...as seen in the integer test, we still need to correct the result when using the
existing (old) horizontal op matching function because it does not model the way
x86 256-bit horizontal ops return results (each 128-bit half is its own horizontal-op).
A potential follow-up change for that is discussed in the bug report - see also D56490.

This generally duplicates a lot of the existing matching code, but we can't just remove
that without introducing regressions, so the existing code is renamed and used less often.
Follow-ups may try to reduce that overlap.

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

Details