re PR middle-end/78726 (Incorrect unsigned arithmetic optimization)
authorJakub Jelinek <jakub@redhat.com>
Fri, 9 Dec 2016 09:21:36 +0000 (10:21 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 9 Dec 2016 09:21:36 +0000 (10:21 +0100)
commit52af5e483d2aab891a364929dedc221771ac1a52
tree456609100605a6588f82180961e320be454aaa3d
parenta059c435890d5dc0baa3563e123f52ecb4bd943b
re PR middle-end/78726 (Incorrect unsigned arithmetic optimization)

PR tree-optimization/78726
* tree-ssa-reassoc.c (make_new_ssa_for_def): Add OPCODE and OP
argument.  For lhs uses in debug stmts, don't replace lhs with
new_lhs, but with a debug temp set to new_lhs opcode op.
(make_new_ssa_for_all_defs): Add OPCODE argument, pass OPCODE and
OP down to make_new_ssa_for_def.
(zero_one_operation): Call make_new_ssa_for_all_defs even when
stmts_to_fix is empty, if *def has not changed yet.  Pass
OPCODE to make_new_ssa_for_all_defs.

* gcc.c-torture/execute/pr78726.c: New test.
* gcc.dg/guality/pr78726.c: New test.

From-SVN: r243476
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr78726.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/guality/pr78726.c [new file with mode: 0644]
gcc/tree-ssa-reassoc.c