Optimize max/min pattern with comparison
authorEugene Rozenfeld <Eugene.Rozenfeld@microsoft.com>
Tue, 1 Dec 2020 23:26:59 +0000 (16:26 -0700)
committerJeff Law <law@redhat.com>
Tue, 1 Dec 2020 23:26:59 +0000 (16:26 -0700)
commitabef36919f741c8e4f7380b2c2ffbc6ad97c2b6b
treefafc77b3b9ea932d0281d39a7d52c3e7aae42fbc
parentdb365b61c53136fd6ccc1a9d4f3fc5c020c28bc3
Optimize max/min pattern with comparison

gcc/
PR tree-optimization/96708
* match.pd: New pattern for comparing X with MAX (X, Y)
or MIN (X, y).

gcc/testsuite
* gcc.dg/pr96708-negative.c: New test.
* gcc.dg/pr96708-positive.c: New test.
gcc/match.pd
gcc/testsuite/gcc.dg/pr96708-negative.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr96708-positive.c [new file with mode: 0644]