2016-03-22 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Mar 2016 14:38:42 +0000 (14:38 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Mar 2016 14:38:42 +0000 (14:38 +0000)
commit19db1ec8f1712d5c6107f6795c82be163fda6c80
tree07e38dec0fc55cf290a215c1b217490973866e7b
parentde634e657fdb4fb88212863ef0a5d0f67aac977d
2016-03-22  Richard Biener  <rguenther@suse.de>

PR middle-end/70251
* genmatch.c (gen_transform): Adjust last parameter to a three-state
int...
(capture::gen_transform): ... to change behavior when substituting
a condition into cond or not-cond expr context.
(dt_simplify::gen_1): Adjust.
* gimple-match-head.c: Include gimplify.h for unshare_expr.
* match.pd (A + (B vcmp C ? 1 : 0) -> A - (B vcmp C)): Revert
last change and instead change to
A + (B vcmp C ? 1 : 0) -> A - (B vcmp C ? -1 : 0).
(A - (B vcmp C ? 1 : 0) -> A + (B vcmp C)): Likewise.

* g++.dg/torture/pr70251.C: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234405 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/genmatch.c
gcc/gimple-match-head.c
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr70251.C [new file with mode: 0644]