* simplify-rtx.c (simplify_replace_rtx): Allow replacement
of matching registers.
From-SVN: r54476
+2002-06-10 Roger Sayle <roger@eyesopen.com>
+
+ * simplify-rtx.c (simplify_replace_rtx): Allow replacement
+ of matching registers.
+
2002-06-10 Roger Sayle <roger@eyesopen.com>
* toplev.c (rest_of_compilation): Disable early if-conversion pass.
}
return x;
- default:
- if (GET_CODE (x) == MEM)
- return
- replace_equiv_address_nv (x,
- simplify_replace_rtx (XEXP (x, 0),
- old, new));
+ case 'o':
+ if (code == MEM)
+ return replace_equiv_address_nv (x,
+ simplify_replace_rtx (XEXP (x, 0),
+ old, new));
+
+ if (REG_P (x) && REG_P (old) && REGNO (x) == REGNO (old))
+ return new;
return x;
+
+ default:
+ return x;
}
return x;
}