]> gcc.gnu.org Git - gcc.git/commit
i386: Use a new temp slot kind for splitter to floatdi<mode>2_i387_with_xmm [PR104674]
authorJakub Jelinek <jakub@redhat.com>
Fri, 25 Feb 2022 11:06:52 +0000 (12:06 +0100)
committerJakub Jelinek <jakub@redhat.com>
Fri, 25 Feb 2022 11:06:52 +0000 (12:06 +0100)
commiteabf7bbe601f2c0d87bd0a1012d7a602df2037da
tree765e23dbe230fa05ff5d72183a021866b8c62b48
parent873b36af995f7f02bb6153320e35649a5d33b5fd
i386: Use a new temp slot kind for splitter to floatdi<mode>2_i387_with_xmm [PR104674]

As mentioned in the PR, the following testcase is miscompiled for similar
reasons as the already fixed PR78791 - we use SLOT_TEMP slots in various
places during expansion and during expansion we can guarantee that the
lifetime of those temporary slot doesn't overlap.  But the following
splitter uses SLOT_TEMP too and in between expansion and split1 there is
a possibility that something extends the lifetime of SLOT_TEMP created
slots across an instruction that will be split by this splitter.

The following patch fixes it by using a new temp slot kind to make sure
it doesn't reuse a SLOT_TEMP that could be live across the instruction.

2022-02-25  Jakub Jelinek  <jakub@redhat.com>

PR target/104674
* config/i386/i386.h (enum ix86_stack_slot): Add SLOT_FLOATxFDI_387.
* config/i386/i386.md (splitter to floatdi<mode>2_i387_with_xmm): Use
SLOT_FLOATxFDI_387 rather than SLOT_TEMP.

* gcc.target/i386/pr104674.c: New test.
gcc/config/i386/i386.h
gcc/config/i386/i386.md
gcc/testsuite/gcc.target/i386/pr104674.c [new file with mode: 0644]
This page took 0.085 seconds and 6 git commands to generate.