Commit 1cdaa211 by Richard Guenther Committed by Richard Biener

re PR tree-optimization/43629 (Struct to register optimization fails)

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.

From-SVN: r157944
parent d33da5cd
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.
2010-04-02 Joseph Myers <joseph@codesourcery.com> 2010-04-02 Joseph Myers <joseph@codesourcery.com>
* read-rtl.c (read_rtx_1): Give an error for EOF while looking for * read-rtl.c (read_rtx_1): Give an error for EOF while looking for
......
2010-04-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43629
* gcc.c-torture/execute/pr43629.c: New testcase.
2010-04-01 Janne Blomqvist <jb@gcc.gnu.org> 2010-04-01 Janne Blomqvist <jb@gcc.gnu.org>
Dominique d'Humieres <dominiq@lps.ens.fr> Dominique d'Humieres <dominiq@lps.ens.fr>
......
int flag;
extern void abort (void);
int main()
{
int x;
if (flag)
x = -1;
else
x &= 0xff;
if (x & ~0xff)
abort ();
return 0;
}
/* Conditional constant propagation pass for the GNU compiler. /* Conditional constant propagation pass for the GNU compiler.
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
Free Software Foundation, Inc. 2010 Free Software Foundation, Inc.
Adapted from original RTL SSA-CCP by Daniel Berlin <dberlin@dberlin.org> Adapted from original RTL SSA-CCP by Daniel Berlin <dberlin@dberlin.org>
Adapted to GIMPLE trees by Diego Novillo <dnovillo@redhat.com> Adapted to GIMPLE trees by Diego Novillo <dnovillo@redhat.com>
...@@ -558,6 +558,9 @@ likely_value (gimple stmt) ...@@ -558,6 +558,9 @@ likely_value (gimple stmt)
has_constant_operand = true; has_constant_operand = true;
} }
if (has_constant_operand)
all_undefined_operands = false;
/* If the operation combines operands like COMPLEX_EXPR make sure to /* If the operation combines operands like COMPLEX_EXPR make sure to
not mark the result UNDEFINED if only one part of the result is not mark the result UNDEFINED if only one part of the result is
undefined. */ undefined. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment