On 08/03/14 08:02, Richard Sandiford wrote:
This also fixes what I think is a bug: find_memory used to stop at the
first MEM it found. If that MEM was nonvolatile and nonconstant, we'd
return MEMREF_NORMAL even if there was another volatile MEM.
gcc/
* df-problems.c: Include rtl-iter.h.
(find_memory): Turn from being a for_each_rtx callback to being
a function that examines each subrtx itself. Continue to look for
volatile references even after a nonvolatile one has been found.
(can_move_insns_across): Update calls accordingly.
OK.
It'd probably be fairly difficult to test for that bug as most of our
targets don't allow multiple memory operands in a single insn. But I
agree with your assessment. Good catch.
jeff