From: Richard Stallman Date: Tue, 19 Oct 1993 04:42:27 +0000 (+0000) Subject: (can_combine_p): Don't combine instructions across a volatile insn. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4b2cb4a29542e58e001ac110a9969925ece7065a;p=gcc.git (can_combine_p): Don't combine instructions across a volatile insn. From-SVN: r5802 --- diff --git a/gcc/combine.c b/gcc/combine.c index bee4d534272..fd559471dd6 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -927,6 +927,14 @@ can_combine_p (insn, i3, pred, succ, pdest, psrc) && p != succ && volatile_refs_p (PATTERN (p))) return 0; + /* If there are any volatile insns between INSN and I3, reject, because + they might affect machine state. */ + + for (p = NEXT_INSN (insn); p != i3; p = NEXT_INSN (p)) + if (GET_RTX_CLASS (GET_CODE (p)) == 'i' + && p != succ && volatile_insn_p (PATTERN (p))) + return 0; + /* If INSN or I2 contains an autoincrement or autodecrement, make sure that register is not used between there and I3, and not already used in I3 either.