--- Comment #5 from Segher Boessenkool <segher at gcc dot> ---
Author: segher
Date: Tue Feb 13 22:12:55 2018
New Revision: 257644

combine: Update links correctly for new I2 (PR84169)

If there is a LOG_LINK between two insns, this means those two insns
can be combined, as far as dataflow is concerned.  There never should
be a LOG_LINK between two unrelated insns.  If there is one, combine
will try to combine the insns without doing all the needed checks if
the earlier destination is used before the later insn, etc.

Unfortunately we do not update the LOG_LINKs correctly in some cases.
This patch fixes at least some of those cases.

        PR rtl-optimization/84169
        * combine.c (try_combine): New variable split_i2i3.  Set it to true if
        we generated a parallel as new i3 and we split that to new i2 and i3
        instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
        LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
        those to i2, not i1.  Partially rewrite this scan code.

        PR rtl-optimization/84169
        * gcc.c-torture/execute/pr84169.c: New.


Reply via email to