On 10/14/2015 08:22 PM, Richard Biener wrote:
I think you could trigger bogus CSE of dereferences of literal addresses from different address-spaces.
Good catch. You're spot on with that.
r~
int test(void)
{
int __seg_fs *f = (int __seg_fs *)16;
int __seg_gs *g = (int __seg_gs *)16;
return *f + *g;
}
test:
movl %fs:16, %eax
addl %eax, %eax
ret
