diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-02 16:50:04 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-02 16:50:04 +0000 |
commit | 87c0a9fc7ecdf7859bd35021f8faff234ac17ca7 (patch) | |
tree | 7db1d8b1c940c4988eb8031069cc5033efd35a1a /gcc/tree-ssa-ccp.c | |
parent | ed99630c871368f8151f4de0a7bd0843fada4615 (diff) | |
download | gcc-87c0a9fc7ecdf7859bd35021f8faff234ac17ca7.tar.gz |
2010-04-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43629
* tree-ssa-ccp.c (likely_value): Reset all_undefined_operands
if we have seen a constant value.
* gcc.c-torture/execute/pr43629.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157944 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 03c35001718..fcfdd18d1bf 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -1,6 +1,6 @@ /* Conditional constant propagation pass for the GNU compiler. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 - Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, + 2010 Free Software Foundation, Inc. Adapted from original RTL SSA-CCP by Daniel Berlin <dberlin@dberlin.org> Adapted to GIMPLE trees by Diego Novillo <dnovillo@redhat.com> @@ -558,6 +558,9 @@ likely_value (gimple stmt) has_constant_operand = true; } + if (has_constant_operand) + all_undefined_operands = false; + /* If the operation combines operands like COMPLEX_EXPR make sure to not mark the result UNDEFINED if only one part of the result is undefined. */ |