tree-optimization/105173 - fix insertion logic in reassoc
The find_insert_point logic around deciding whether to insert
before or after the found insertion point does not handle
the case of _12 = ..;, _12, 1.0 well. The following puts the
logic into find_insert_point itself instead.
2022-04-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/105173
* tree-ssa-reassoc.cc (find_insert_point): Get extra
insert_before output argument and compute it.
(insert_stmt_before_use): Adjust.
(rewrite_expr_tree): Likewise.
* gcc.dg/pr105173.c: New testcase.