if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER)
continue;
- if (GET_CODE (pat) == SEQUENCE)
+ if (rtx_sequence *seq = dyn_cast <rtx_sequence *> (pat))
{
/* Stop for a CALL and its delay slots because it is difficult to
track its resource needs correctly. */
- if (CALL_P (XVECEXP (pat, 0, 0)))
+ if (CALL_P (seq->element (0)))
return 0;
/* Stop for an INSN or JUMP_INSN with delayed effects and its delay
correctly. */
#ifdef INSN_SETS_ARE_DELAYED
- if (INSN_SETS_ARE_DELAYED (XVECEXP (pat, 0, 0)))
+ if (INSN_SETS_ARE_DELAYED (seq->element (0)))
return 0;
#endif
#ifdef INSN_REFERENCES_ARE_DELAYED
- if (INSN_REFERENCES_ARE_DELAYED (XVECEXP (pat, 0, 0)))
+ if (INSN_REFERENCES_ARE_DELAYED (seq->element (0)))
return 0;
#endif
/* See if any of the insns in the delay slot match, updating
resource requirements as we go. */
- for (i = XVECLEN (pat, 0) - 1; i > 0; i--)
- if (GET_CODE (XVECEXP (pat, 0, i)) == GET_CODE (insn)
- && rtx_equal_p (PATTERN (XVECEXP (pat, 0, i)), ipat)
- && ! find_reg_note (XVECEXP (pat, 0, i), REG_UNUSED, NULL_RTX))
+ for (i = seq->len () - 1; i > 0; i--)
+ if (GET_CODE (seq->element (i)) == GET_CODE (insn)
+ && rtx_equal_p (PATTERN (seq->element (i)), ipat)
+ && ! find_reg_note (seq->element (i), REG_UNUSED, NULL_RTX))
break;
/* If found a match, exit this loop early. */
if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER)
continue;
- if (GET_CODE (pat) == SEQUENCE)
+ if (rtx_sequence *seq = dyn_cast <rtx_sequence *> (pat))
{
bool annul_p = false;
- rtx control = XVECEXP (pat, 0, 0);
+ rtx control = seq->element (0);
/* If this is a CALL_INSN and its delay slots, it is hard to track
the resource needs properly, so give up. */
/* See if any of the insns in the delay slot match, updating
resource requirements as we go. */
- for (i = XVECLEN (pat, 0) - 1; i > 0; i--)
+ for (i = seq->len () - 1; i > 0; i--)
{
- rtx candidate = XVECEXP (pat, 0, i);
+ rtx candidate = seq->element (i);
/* If an insn will be annulled if the branch is false, it isn't
considered as a possible duplicate insn. */