HomePhabricator

[SLP] allow matching integer min/max intrinsics as reduction ops

Authored by spatel on Mar 29 2021, 5:19 AM.

Description

[SLP] allow matching integer min/max intrinsics as reduction ops

This is a 2nd try of:
3c8473ba534
which was reverted at:
a26312f9d4f
because of crashing.

This version includes extra code and tests to avoid the known
crashing examples as discussed in PR49730.

Original commit message:
As noted in D98152, we need to patch SLP to avoid regressions when
we start canonicalizing to integer min/max intrinsics.
Most of the real work to make this possible was in:
7202f47508

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