Re: [PATCH] Add value range info for affine combination to improve store motion (PR83403)

2020-04-29 Thread luoxhu via Gcc-patches
On 2020/4/28 18:30, Richard Biener wrote: > > OK, I guess instead of get_range_info expr_to_aff_combination could > simply use determine_value_range (op0, &minv, &maxv) == VR_RANGE > (the && TREE_CODE (op0) == SSA_NAME check can then be removed)? > Tried with determine_value_range, it works

Re: [PATCH] Add value range info for affine combination to improve store motion (PR83403)

2020-04-28 Thread Richard Biener
On Tue, 28 Apr 2020, luoxhu wrote: > > > On 2020/4/28 15:01, Richard Biener wrote: > > On Tue, 28 Apr 2020, Xionghu Luo wrote: > > > >> From: Xionghu Luo > >> > >> Get and propagate value range info to convert expressions with convert > >> operation on PLUS_EXPR/MINUS_EXPR/MULT_EXPR when not o

Re: [PATCH] Add value range info for affine combination to improve store motion (PR83403)

2020-04-28 Thread luoxhu via Gcc-patches
On 2020/4/28 15:01, Richard Biener wrote: > On Tue, 28 Apr 2020, Xionghu Luo wrote: > >> From: Xionghu Luo >> >> Get and propagate value range info to convert expressions with convert >> operation on PLUS_EXPR/MINUS_EXPR/MULT_EXPR when not overflow. i.e.: >> >> (long unsigned int)((unsigned

Re: [PATCH] Add value range info for affine combination to improve store motion (PR83403)

2020-04-28 Thread Richard Biener
On Tue, 28 Apr 2020, Xionghu Luo wrote: > From: Xionghu Luo > > Get and propagate value range info to convert expressions with convert > operation on PLUS_EXPR/MINUS_EXPR/MULT_EXPR when not overflow. i.e.: > > (long unsigned int)((unsigned int)n * 10 + 1) > => > (long unsigned int)((unsigned

[PATCH] Add value range info for affine combination to improve store motion (PR83403)

2020-04-27 Thread Xionghu Luo via Gcc-patches
From: Xionghu Luo Get and propagate value range info to convert expressions with convert operation on PLUS_EXPR/MINUS_EXPR/MULT_EXPR when not overflow. i.e.: (long unsigned int)((unsigned int)n * 10 + 1) => (long unsigned int)((unsigned int) n * (long unsigned int)10 + (long unsigned int)1)