HomePhabricator

[NARY] Don't optimize min/max if there are side uses (part2)

Authored by Evgeniy Brevnov <ybrevnov@azul.com> on Apr 27 2021, 6:15 AM.

Description

[NARY] Don't optimize min/max if there are side uses (part2)

Previous attempt to fix infinite recursion in min/max reassociation was not fully successful (D100170). Newly discovered failing case is due to not properly handled when there is a single use. It should be processed separately from 2 uses case.

Reviewed By: mkazantsev

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