Skip to content
Snippets Groups Projects
Commit 07852a81 authored by Richard Biener's avatar Richard Biener
Browse files

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.
parent 6802b5ba
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment