Commit 0a35a733 authored by jakub's avatar jakub
Browse files

PR debug/52001

	* var-tracking.c (reverse_op): Don't add any reverse operation
	if V already has any constant locations.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183608 138bc75d-0d04-0410-961f-82ee72b054a4
parent 15bd2796
2012-01-27 Jakub Jelinek <jakub@redhat.com>
PR debug/52001
* var-tracking.c (reverse_op): Don't add any reverse operation
if V already has any constant locations.
2012-01-27 Sandra Loosemore <sandra@codesourcery.com>
* doc/invoke.texi: Correct usage of "command line" (noun)
......
......@@ -5298,6 +5298,7 @@ reverse_op (rtx val, const_rtx expr, rtx insn)
{
rtx src, arg, ret;
cselib_val *v;
struct elt_loc_list *l;
enum rtx_code code;
if (GET_CODE (expr) != SET)
......@@ -5333,6 +5334,14 @@ reverse_op (rtx val, const_rtx expr, rtx insn)
if (!v || !cselib_preserved_value_p (v))
return;
/* Adding a reverse op isn't useful if V already has an always valid
location. Ignore ENTRY_VALUE, while it is always constant, we should
prefer non-ENTRY_VALUE locations whenever possible. */
for (l = v->locs; l; l = l->next)
if (CONSTANT_P (l->loc)
&& (GET_CODE (l->loc) != CONST || !references_value_p (l->loc, 0)))
return;
switch (GET_CODE (src))
{
case NOT:
......
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