https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102733
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 55238 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55238&action=edit Patch which I will be testing This adds a check for the address space in DSE. Even tested: ``` void test_null_store_fs_gs (void) { int __seg_fs *fs = (int __seg_fs *)0; *fs = 1; int __seg_gs *gs = (int __seg_gs *)0; *gs = 2; *fs = 3; } ``` And only 2/3 are emitted (in that order) which is the correct DSE even.