Re: Fix folding of EQ/NE_EXPR WRT symtab aliases

2014-12-17 Thread Richard Biener
On Wed, Dec 17, 2014 at 11:30 AM, Tejas Belagod wrote: > On 07/12/14 07:38, Jan Hubicka wrote: >> >> Hi, >> this is simplified patch that only adds the equal_address_to predicate >> (and thus fixes issues >> with inccorect folding of speculative calls). Hopefully it will mek it >> easier to handle

Re: Fix folding of EQ/NE_EXPR WRT symtab aliases

2014-12-17 Thread Tejas Belagod
On 07/12/14 07:38, Jan Hubicka wrote: Hi, this is simplified patch that only adds the equal_address_to predicate (and thus fixes issues with inccorect folding of speculative calls). Hopefully it will mek it easier to handle the rest of fold-const incrementally. Bootstrapped/regtested x86_64-lin

Re: Fix folding of EQ/NE_EXPR WRT symtab aliases

2014-12-06 Thread Jan Hubicka
Hi, this is simplified patch that only adds the equal_address_to predicate (and thus fixes issues with inccorect folding of speculative calls). Hopefully it will mek it easier to handle the rest of fold-const incrementally. Bootstrapped/regtested x86_64-linux, comitted * symtab.c (symtab

Re: Fix folding of EQ/NE_EXPR WRT symtab aliases

2014-12-04 Thread Jan Hubicka
> On December 4, 2014 6:34:18 PM CET, Jan Hubicka wrote: > >> > >> I think you want get_addr_base_and_unit_offset here. But I really > >wonder > > > >I copied what I found in tree-ssa-alias. The differenc eis that > >get_addr_base_and_unit_offset won't give a range for variable sized > >accesses

Re: Fix folding of EQ/NE_EXPR WRT symtab aliases

2014-12-04 Thread Richard Biener
On December 4, 2014 6:34:18 PM CET, Jan Hubicka wrote: >> >> I think you want get_addr_base_and_unit_offset here. But I really >wonder > >I copied what I found in tree-ssa-alias. The differenc eis that >get_addr_base_and_unit_offset won't give a range for variable sized >accesses right? Yes. Bu

Re: Fix folding of EQ/NE_EXPR WRT symtab aliases

2014-12-04 Thread Jan Hubicka
> > I think you want get_addr_base_and_unit_offset here. But I really wonder I copied what I found in tree-ssa-alias. The differenc eis that get_addr_base_and_unit_offset won't give a range for variable sized accesses right? > what cases this code catches that the code in fold_comparison you t

Re: Fix folding of EQ/NE_EXPR WRT symtab aliases

2014-12-04 Thread Richard Biener
On Thu, Dec 4, 2014 at 12:28 AM, Jan Hubicka wrote: > Hi, > this patch fixes fold-const folding if EQ/NE_EXPR of ADDR_EXPRS WRT aliases > and > weaks. Similarly as my earlier nonzero_address_p patch, it moves the logic > whether two symbls can resolve to same location to symtab. > > The existing

Fix folding of EQ/NE_EXPR WRT symtab aliases

2014-12-03 Thread Jan Hubicka
Hi, this patch fixes fold-const folding if EQ/NE_EXPR of ADDR_EXPRS WRT aliases and weaks. Similarly as my earlier nonzero_address_p patch, it moves the logic whether two symbls can resolve to same location to symtab. The existing code did not make much sense to me, so I tried to follow what alias