2013-10-17 Richard Biener <rguenther@suse.de>
commitbc228ba1571ffea2c7a33835a88e1f0509d3378b
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Oct 2013 09:59:47 +0000 (17 09:59 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Oct 2013 09:59:47 +0000 (17 09:59 +0000)
tree8d7974135748186f9ae1e8c1ad50e589d9721b56
parent43d03c2381ee68cd880b58706f30e6029deb6934
2013-10-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/58143
* tree-ssa-loop-im.c (arith_code_with_undefined_signed_overflow):
New function.
(rewrite_to_defined_overflow): Likewise.
(move_computations_dom_walker::before_dom): Rewrite stmts
with undefined signed overflow that are not always executed
into unsigned arithmetic.

* gcc.dg/torture/pr58143-1.c: New testcase.
* gcc.dg/torture/pr58143-2.c: Likewise.
* gcc.dg/torture/pr58143-3.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203745 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr58143-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr58143-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr58143-3.c [new file with mode: 0644]
gcc/tree-ssa-loop-im.c