This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/84169] [8 Regression] wrong code with u128 multiplication result at aarch64 -O


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84169

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

URL: https://gcc.gnu.org/viewcvs?rev=257644&root=gcc&view=rev
Log:
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.

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

Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/pr84169.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/combine.c
    trunk/gcc/testsuite/ChangeLog

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]