tree-optimization/96579 - another special-operands fix in reassoc
authorRichard Biener <rguenther@suse.de>
Thu, 27 Aug 2020 08:02:22 +0000 (10:02 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 27 Aug 2020 08:02:22 +0000 (10:02 +0200)
commitff7463172e564c5dd2432d7af8eaa0124cbd4af7
treed29631ae1d58a73d980abed5c5bc773b4a61fa0d
parent989bc4ca2f2978baecff00f6d0532994b82897ef
tree-optimization/96579 - another special-operands fix in reassoc

This makes sure to put special-ops expanded rhs left where
expression rewrite expects it.

2020-08-27  Richard Biener  <rguenther@suse.de>

PR tree-optimization/96579
* tree-ssa-reassoc.c (linearize_expr_tree): If we expand
rhs via special ops make sure to swap operands.

* gcc.dg/pr96579.c: New testcase.
gcc/testsuite/gcc.dg/pr96579.c [new file with mode: 0644]
gcc/tree-ssa-reassoc.c