2014-01-15 Tom de Vries <tom@codesourcery.com>
* rtlanal.c (find_all_hard_reg_sets): Note INSN_CALL_FUNCTION_USAGE
clobbers.
@@ -1052,8 +1052,14 @@ find_all_hard_reg_sets (const_rtx insn, HARD_REG_SET *pset, bool implicit)
CLEAR_HARD_REG_SET (*pset);
note_stores (PATTERN (insn), record_hard_reg_sets, pset);
- if (implicit && CALL_P (insn))
- IOR_HARD_REG_SET (*pset, call_used_reg_set);
+ if (CALL_P (insn))
+ {
+ if (implicit)
+ IOR_HARD_REG_SET (*pset, call_used_reg_set);
+
+ for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1))
+ record_hard_reg_sets (XEXP (link, 0), NULL, pset);
+ }
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == REG_INC)
record_hard_reg_sets (XEXP (link, 0), NULL, pset);