Re: [PATCH 8/9] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-14 Thread Richard Henderson
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;

Re: [PATCH 8/9] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-14 Thread Jeff Law
On 10/14/2015 03:19 AM, Richard Biener wrote: On Tue, Oct 13, 2015 at 10:59 PM, Richard Henderson wrote: On 10/14/2015 02:49 AM, Jeff Law wrote: The problem here is we don't know what address space the *0 is going to hit, right? Correct, not before we do the walk of stmt to see what's pres

Re: [PATCH 8/9] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-14 Thread Jeff Law
On 10/13/2015 02:59 PM, Richard Henderson wrote: On 10/14/2015 02:49 AM, Jeff Law wrote: The problem here is we don't know what address space the *0 is going to hit, right? Correct, not before we do the walk of stmt to see what's present. So the address space information isn't part of the addr

Re: [PATCH 8/9] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-14 Thread Richard Biener
On Wed, Oct 14, 2015 at 11:19 AM, Richard Biener wrote: > On Tue, Oct 13, 2015 at 10:59 PM, Richard Henderson wrote: >> On 10/14/2015 02:49 AM, Jeff Law wrote: >>> >>> The problem here is we don't know what address space the *0 is going to >>> hit, >>> right? >> >> >> Correct, not before we do th

Re: [PATCH 8/9] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-14 Thread Richard Biener
On Tue, Oct 13, 2015 at 10:59 PM, Richard Henderson wrote: > On 10/14/2015 02:49 AM, Jeff Law wrote: >> >> The problem here is we don't know what address space the *0 is going to >> hit, >> right? > > > Correct, not before we do the walk of stmt to see what's present. > >> Isn't that also an issue

Re: [PATCH 8/9] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-13 Thread Richard Henderson
On 10/14/2015 02:49 AM, Jeff Law wrote: The problem here is we don't know what address space the *0 is going to hit, right? Correct, not before we do the walk of stmt to see what's present. Isn't that also an issue for code generation as well? What sort of problem are you thinking of? I ha

Re: [PATCH 8/9] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-13 Thread Jeff Law
On 10/13/2015 04:13 AM, Richard Biener wrote: On Tue, Oct 13, 2015 at 1:27 AM, Richard Henderson wrote: On 10/12/2015 09:10 PM, Richard Biener wrote: The check_loadstore change should instead have adjusted the flag_delete_null_pointer_checks guard in infer_nonnull_range_by_dereference. No

Re: [PATCH 8/9] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-13 Thread Richard Biener
On Tue, Oct 13, 2015 at 1:27 AM, Richard Henderson wrote: > On 10/12/2015 09:10 PM, Richard Biener wrote: The check_loadstore change should instead have adjusted the flag_delete_null_pointer_checks guard in infer_nonnull_range_by_dereference. >>> >>> >>> >>> Nope, that doesn't

Re: [PATCH 8/9] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-12 Thread Richard Henderson
On 10/12/2015 09:10 PM, Richard Biener wrote: The check_loadstore change should instead have adjusted the flag_delete_null_pointer_checks guard in infer_nonnull_range_by_dereference. Nope, that doesn't work. You have to wait until you see the actual MEM being dereferenced before you can look

Re: [PATCH 8/9] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-12 Thread Richard Biener
On Thu, Oct 8, 2015 at 11:10 PM, Richard Henderson wrote: > On 10/08/2015 09:20 PM, Richard Biener wrote: >> >> On Thu, Oct 8, 2015 at 6:59 AM, Richard Henderson wrote: >>> >>> * target.def (TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID): New. >>> * targhooks.h (default_addr_space_zero_a

Re: [PATCH 8/9] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-09 Thread Richard Henderson
On 10/08/2015 09:20 PM, Richard Biener wrote: On Thu, Oct 8, 2015 at 6:59 AM, Richard Henderson wrote: * target.def (TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID): New. * targhooks.h (default_addr_space_zero_address_valid): Declare. * targhooks.c (default_addr_space_zero_addr

Re: [PATCH 8/9] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-08 Thread Richard Biener
On Thu, Oct 8, 2015 at 6:59 AM, Richard Henderson wrote: > * target.def (TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID): New. > * targhooks.h (default_addr_space_zero_address_valid): Declare. > * targhooks.c (default_addr_space_zero_address_valid): New. > * doc/tm.texi, doc/

[PATCH 8/9] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID

2015-10-07 Thread Richard Henderson
* target.def (TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID): New. * targhooks.h (default_addr_space_zero_address_valid): Declare. * targhooks.c (default_addr_space_zero_address_valid): New. * doc/tm.texi, doc/tm.texi.in: Update. * config/i386/i386.c (ix86_addr_space_