]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PR115568][LRA]: Use more strict output reload check in rematerialization
authorVladimir N. Makarov <vmakarov@redhat.com>
Wed, 5 Feb 2025 19:23:23 +0000 (14:23 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Wed, 5 Feb 2025 19:25:01 +0000 (14:25 -0500)
commit98545441308c2ae4d535f14b108ad6551fd927d5
tree03c37c5e385d42830e2025f3636582d9d389e2f8
parent0006c07b7ac6594195d5db322e39907203be4c2a
[PR115568][LRA]: Use more strict output reload check in rematerialization

  In this PR case LRA rematerialized a value from inheritance insn
instead of output reload one.  This resulted in considering a
rematerilization candidate value available when it was actually
not.  As a consequence an insn after rematerliazation used the
unexpected value and this use resulted in fp exception.  The patch
fixes this bug.

gcc/ChangeLog:

PR rtl-optimization/115568
* lra-remat.cc (create_cands): Check that output reload insn is
adjacent to given insn.  Update a comment.

gcc/testsuite/ChangeLog:

PR rtl-optimization/115568
* gcc.target/i386/pr115568.c: New.
gcc/lra-remat.cc
gcc/testsuite/gcc.target/i386/pr115568.c [new file with mode: 0644]