re PR tree-optimization/81082 (Failure to vectorise after reassociating index computa...
authorRichard Biener <rguenther@suse.de>
Fri, 26 Jan 2018 10:30:36 +0000 (10:30 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 26 Jan 2018 10:30:36 +0000 (10:30 +0000)
commit5b55e6e333c97aaefc1db6c9d8411de578d05614
tree21db3fe6e8247b8085351073439c65bef3bda73c
parentaf2e3244f56152d94a18c1339a18a4c0b0e33060
re PR tree-optimization/81082 (Failure to vectorise after reassociating index computation)

2018-01-26  Richard Biener  <rguenther@suse.de>

PR tree-optimization/81082
* fold-const.c (fold_plusminus_mult_expr): Do not perform the
association if it requires casting to unsigned.
* match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
from fold_plusminus_mult_expr to catch important cases late when
range info is available.

* gcc.dg/vect/pr81082.c: New testcase.
* gcc.dg/tree-ssa/loop-15.c: XFAIL the (int)((unsigned)n + -1U) * n + n
simplification to n * n.

From-SVN: r257077
gcc/ChangeLog
gcc/fold-const.c
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/loop-15.c
gcc/testsuite/gcc.dg/vect/pr81082.c [new file with mode: 0644]