]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Require in peephole2 that memory is offsettable [PR119450]
authorJakub Jelinek <jakub@redhat.com>
Wed, 26 Mar 2025 07:47:20 +0000 (08:47 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 27 Mar 2025 23:40:16 +0000 (00:40 +0100)
commit4b364531057c973795dc15d75132fb6c2ea6219b
tree8f37bffc9d442f9f6c4c9bc4d3423cf616ee58f2
parentf9dab50e6e5e0ecd1f004432749b43b3caab059c
i386: Require in peephole2 that memory is offsettable [PR119450]

The following testcase ICEs because a peephole2 attempts to offset
memory which is not offsettable (in particular address is a ZERO_EXTEND
in this case).

Because peephole2s don't support constraints, I've added a check for this
in the peephole2's condition.

2025-03-26  Jakub Jelinek  <jakub@redhat.com>

PR target/119450
* config/i386/i386.md (narrow test peephole2): Test for
offsettable_memref_p in condition.

* gcc.target/i386/pr119450.c: New test.

(cherry picked from commit 84f0b648aeb053b3bd8e1cb6fe282f4da4143708)
gcc/config/i386/i386.md
gcc/testsuite/gcc.target/i386/pr119450.c [new file with mode: 0644]