consider instructions of the form move.x (%ax)+, -(%ax) as no-op instructions.

They really don't do anything, and they confuse the rest of the
compiler when they are generated as a result of passing the result of one
pascal function to another function.
This commit is contained in:
Wolfgang Thaller 2014-09-25 18:56:56 +02:00
parent 025ebb6397
commit 5648c5be94

View File

@ -1180,7 +1180,24 @@ set_noop_p (const_rtx set)
return 1;
if (MEM_P (dst) && MEM_P (src))
return rtx_equal_p (dst, src) && !side_effects_p (dst);
{
if (rtx_equal_p (dst, src) && !side_effects_p (dst))
return 1;
src = XEXP(src, 0);
dst = XEXP(dst, 0);
if( GET_CODE(src) == POST_INC && GET_CODE(dst) == PRE_DEC )
{
src = XEXP(src, 0);
dst = XEXP(dst, 0);
if (rtx_equal_p (dst, src) && !side_effects_p (dst))
return 1;
}
return 0;
}
if (GET_CODE (dst) == ZERO_EXTRACT)
return rtx_equal_p (XEXP (dst, 0), src)