Re: [PATCH GCC]Simplify (convert)(X op const) -> (convert)X op (convert)const by match

2016-10-14 Thread Richard Biener
On Thu, Oct 13, 2016 at 5:22 PM, Jeff Law wrote: > On 10/12/2016 02:48 AM, Richard Biener wrote: >> >> On Tue, Oct 11, 2016 at 11:34 PM, Marc Glisse >> wrote: >>> >>> On Tue, 11 Oct 2016, Bin Cheng wrote: >>> We missed folding (convert)(X op const) ->

Re: [PATCH GCC]Simplify (convert)(X op const) -> (convert)X op (convert)const by match

2016-10-13 Thread Jeff Law
On 10/12/2016 02:48 AM, Richard Biener wrote: On Tue, Oct 11, 2016 at 11:34 PM, Marc Glisse wrote: On Tue, 11 Oct 2016, Bin Cheng wrote: We missed folding (convert)(X op const) -> (convert)X op (convert)const for unsigned narrowing because of reason reported at

Re: [PATCH GCC]Simplify (convert)(X op const) -> (convert)X op (convert)const by match

2016-10-12 Thread Richard Biener
On Tue, Oct 11, 2016 at 11:34 PM, Marc Glisse wrote: > On Tue, 11 Oct 2016, Bin Cheng wrote: > >> We missed folding (convert)(X op const) -> (convert)X op (convert)const >> for unsigned narrowing because of reason reported at >>

Re: [PATCH GCC]Simplify (convert)(X op const) -> (convert)X op (convert)const by match

2016-10-11 Thread Marc Glisse
On Tue, 11 Oct 2016, Bin Cheng wrote: We missed folding (convert)(X op const) -> (convert)X op (convert)const for unsigned narrowing because of reason reported at https://gcc.gnu.org/ml/gcc/2016-07/msg00126.html This patch fixes the issue by adding new match pattern, it also adds a test

[PATCH GCC]Simplify (convert)(X op const) -> (convert)X op (convert)const by match

2016-10-11 Thread Bin Cheng
Hi, We missed folding (convert)(X op const) -> (convert)X op (convert)const for unsigned narrowing because of reason reported at https://gcc.gnu.org/ml/gcc/2016-07/msg00126.html This patch fixes the issue by adding new match pattern, it also adds a test case. This is the prerequisite patch for