]> gcc.gnu.org Git - gcc.git/commit
rtl-optimization: [PR102733] DSE removing address which only differ by address space.
authorAndrew Pinski <apinski@marvell.com>
Fri, 2 Jun 2023 04:17:56 +0000 (21:17 -0700)
committerAndrew Pinski <apinski@marvell.com>
Fri, 2 Jun 2023 19:45:17 +0000 (19:45 +0000)
commit64ca6aa74b6b5a9737f3808bf4a947dd5c122d47
tree6578431b053c1ce3e061ed8fd812013e4d54744c
parentdf0853d72d38247aed577a4511450c91794f2f06
rtl-optimization: [PR102733] DSE removing address which only differ by address space.

The problem here is DSE was not taking into account the address space
which meant if you had two addresses say `fs:0` and `gs:0` (on x86_64),
DSE would think they were the same and remove the first store.
This fixes that issue by adding a check for the address space too.

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

PR rtl-optimization/102733

gcc/ChangeLog:

* dse.cc (store_info): Add addrspace field.
(record_store): Record the address space
and check to make sure they are the same.

gcc/testsuite/ChangeLog:

* gcc.target/i386/addr-space-6.c: New test.
gcc/dse.cc
gcc/testsuite/gcc.target/i386/addr-space-6.c [new file with mode: 0644]
This page took 0.096375 seconds and 5 git commands to generate.