We are trying to examine all uses of a reg, but overlook those in a REG_EQUIV note. This is problematic as documented in the PR.

The following patch fixes it according to Pat Haugen. Bootstrapped and tested on x86_64-linux, ok?


Bernd
	* ira.c (find_moveable_pseudos): Skip registers whose
	DF_REG_EQ_USE_COUNT is nonzero.

Index: gcc/ira.c
===================================================================
--- gcc/ira.c	(revision 186875)
+++ gcc/ira.c	(working copy)
@@ -3764,6 +3764,7 @@ find_moveable_pseudos (void)
 	    if (DF_REG_DEF_COUNT (regno) != 1
 		|| !DF_REF_INSN_INFO (def)
 		|| HARD_REGISTER_NUM_P (regno)
+		|| DF_REG_EQ_USE_COUNT (regno) > 0
 		|| (!INTEGRAL_MODE_P (mode) && !FLOAT_MODE_P (mode)))
 	      continue;
 	    def_insn = DF_REF_INSN (def);

Reply via email to