gcc/ * function.c (contains): Introduce local "seq" for PATTERN (insn), with a checked cast, in the region for where we know it's a SEQUENCE. Use methods of rtx_sequence. --- gcc/function.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/function.c b/gcc/function.c index 771ced9..5561dc5 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -5305,9 +5305,10 @@ contains (const_rtx insn, htab_t hash) if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE) { + rtx_sequence *seq = as_a <rtx_sequence *> (PATTERN (insn)); int i; - for (i = XVECLEN (PATTERN (insn), 0) - 1; i >= 0; i--) - if (htab_find (hash, XVECEXP (PATTERN (insn), 0, i))) + for (i = seq->len () - 1; i >= 0; i--) + if (htab_find (hash, seq->element (i))) return true; return false; } -- 1.8.5.3