Re: [PATCH] Fix RTL DSE (PR rtl-optimization/68955, take 2)

2016-01-19 Thread Eric Botcazou
> So shall I take out the CONST_WIDE_INT/CONST_DOUBLE handling and just > check for CONST_INT_P instead of CONST_SCALAR_INT_P ? I thought it is just > easy thing to handle, though for DSE which cares about addresses it really > does not matter. Or can I leave it in? Your call. > DSE will only c

Re: [PATCH] Fix RTL DSE (PR rtl-optimization/68955, take 2)

2016-01-19 Thread Jakub Jelinek
On Tue, Jan 19, 2016 at 12:43:53PM +0100, Eric Botcazou wrote: > > 2016-01-19 Jakub Jelinek > > > > PR rtl-optimization/68955 > > PR rtl-optimization/64557 > > * dse.c (record_store, check_mem_read_rtx): Don't call get_addr > > here. Fix up formatting. > > * alias.c (get_ad

Re: [PATCH] Fix RTL DSE (PR rtl-optimization/68955, take 2)

2016-01-19 Thread Eric Botcazou
> 2016-01-19 Jakub Jelinek > > PR rtl-optimization/68955 > PR rtl-optimization/64557 > * dse.c (record_store, check_mem_read_rtx): Don't call get_addr > here. Fix up formatting. > * alias.c (get_addr): Handle VALUE + CONST_INT. VALUE +/- CONST_INT (and actually a

[PATCH] Fix RTL DSE (PR rtl-optimization/68955, take 2)

2016-01-18 Thread Jakub Jelinek
On Mon, Jan 18, 2016 at 11:40:23AM +0100, Eric Botcazou wrote: > > So, do you suggest to tweak get_addr like the patch below, and remove the > > mem_addr = get_addr (mem_addr); > > line above and the comment? > > Yes, exactly. And if that doesn't easily work, then go for your solution and > ad

Re: [PATCH] Fix RTL DSE (PR rtl-optimization/68955)

2016-01-18 Thread Eric Botcazou
> So, do you suggest to tweak get_addr like the patch below, and remove the > mem_addr = get_addr (mem_addr); > line above and the comment? Yes, exactly. And if that doesn't easily work, then go for your solution and add a blurb to the comment explaining why get_addr cannot be easily changed.

Re: [PATCH] Fix RTL DSE (PR rtl-optimization/68955)

2016-01-18 Thread Jakub Jelinek
On Mon, Jan 18, 2016 at 10:06:44AM +0100, Eric Botcazou wrote: > > The following testcase is miscompiled on i686-linux at -O3. > > The bug is in DSE record_store, which for group_id < 0 uses mem_addr > > set to result of get_addr (base->val_rtx) (plus optional offset), > > which is fine for canon_t

Re: [PATCH] Fix RTL DSE (PR rtl-optimization/68955)

2016-01-18 Thread Eric Botcazou
> The following testcase is miscompiled on i686-linux at -O3. > The bug is in DSE record_store, which for group_id < 0 uses mem_addr > set to result of get_addr (base->val_rtx) (plus optional offset), > which is fine for canon_true_dependence with other MEMs in that function, > but we also store th

[PATCH] Fix RTL DSE (PR rtl-optimization/68955)

2016-01-15 Thread Jakub Jelinek
Hi! The following testcase is miscompiled on i686-linux at -O3. The bug is in DSE record_store, which for group_id < 0 uses mem_addr set to result of get_addr (base->val_rtx) (plus optional offset), which is fine for canon_true_dependence with other MEMs in that function, but we also store that ad