diff options
author | Richard Guenther <rguenther@suse.de> | 2009-10-05 13:18:09 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-10-05 13:18:09 +0000 |
commit | e9d85fa6a7fdd48c00c02b8ad915a75d3b025708 (patch) | |
tree | a75051f3125eb16e951b2147ac6b7ed7152c8259 /gcc/tree-ssa-dom.c | |
parent | 916bd5f07f8a76e05c7f08d5a9b8ac5a21be23d5 (diff) | |
download | gcc-e9d85fa6a7fdd48c00c02b8ad915a75d3b025708.zip gcc-e9d85fa6a7fdd48c00c02b8ad915a75d3b025708.tar.gz gcc-e9d85fa6a7fdd48c00c02b8ad915a75d3b025708.tar.bz2 |
re PR tree-optimization/23821 (DOM and VRP creating harder to optimize code)
2009-10-05 Richard Guenther <rguenther@suse.de>
PR tree-optimization/23821
* tree-vrp.c (vrp_finalize): Do not perform copy propagation.
* tree-ssa-dom.c (cprop_operand): Do not propagate copies into
simple IV increments.
* gcc.dg/torture/pr23821.c: New testcase.
From-SVN: r152449
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r-- | gcc/tree-ssa-dom.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 05a8d92..4bad3dd 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -1998,6 +1998,12 @@ cprop_operand (gimple stmt, use_operand_p op_p) if (loop_depth_of_name (val) > loop_depth_of_name (op)) return; + /* Do not propagate copies into simple IV increment statements. + See PR23821 for how this can disturb IV analysis. */ + if (TREE_CODE (val) != INTEGER_CST + && simple_iv_increment_p (stmt)) + return; + /* Dump details. */ if (dump_file && (dump_flags & TDF_DETAILS)) { |