tree-optimization/95393 - fold MIN/MAX_EXPR generated by phiopt
This makes sure to fold generated stmts so they do not survive
until RTL expansion and cause awkward code generation.
2020-05-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/95393
* tree-ssa-phiopt.c (minmax_replacement): Use gimple_build
to build the min/max expression so we simplify cases like
MAX(0, s) immediately.
* gcc.dg/tree-ssa/phi-opt-21.c: New testcase.
* g++.dg/vect/slp-pr87105.cc: Adjust.