Move min(max...) and max(min...) folds to match.pd
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 27 Oct 2015 11:56:18 +0000 (11:56 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 27 Oct 2015 11:56:18 +0000 (11:56 +0000)
commit4a334cbaf89552015039132e0016b003a5022e73
tree7c355bb077f64ab4a548684c4a48eece27b439e5
parent2f97d24cad349a09ee1beb3e20b636925aa9baa9
Move min(max...) and max(min...) folds to match.pd

This handles both integer and floating-point arguments.  It's needed
for the follow-on patch to move fmin and fmax to match.pd.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
* fold-const.c (fold_minmax): Delete.
(fold_binary_loc): Don't call it.
* match.pd: Add rules previously handled by fold_minmax.

From-SVN: r229430
gcc/ChangeLog
gcc/fold-const.c
gcc/match.pd