Re: Generating gimple assign stmt that changes sign

2018-05-22 Thread Jeff Law
On 05/21/2018 05:25 PM, Kugan Vivekanandarajah wrote: > Hi Jeff, > > Thanks for the prompt reply. > > On 22 May 2018 at 09:10, Jeff Law wrote: >> On 05/21/2018 04:50 PM, Kugan Vivekanandarajah wrote: >>> Hi, >>> >>> I am looking to introduce ABSU_EXPR and that would create: >>> >>> unsigned shor

Re: Generating gimple assign stmt that changes sign

2018-05-22 Thread Richard Biener
On Tue, May 22, 2018 at 12:51 AM Kugan Vivekanandarajah < kugan.vivekanandara...@linaro.org> wrote: > Hi, > I am looking to introduce ABSU_EXPR and that would create: > unsigned short res = ABSU_EXPR (short); > Note that the argument is signed and result is unsigned. As per the > review, I have

Re: Generating gimple assign stmt that changes sign

2018-05-21 Thread Marc Glisse
On Tue, 22 May 2018, Kugan Vivekanandarajah wrote: Hi, I am looking to introduce ABSU_EXPR and that would create: unsigned short res = ABSU_EXPR (short); Note that the argument is signed and result is unsigned. As per the review, I have a match.pd entry to generate this as: (simplify (abs (co

Re: Generating gimple assign stmt that changes sign

2018-05-21 Thread Kugan Vivekanandarajah
Hi Jeff, Thanks for the prompt reply. On 22 May 2018 at 09:10, Jeff Law wrote: > On 05/21/2018 04:50 PM, Kugan Vivekanandarajah wrote: >> Hi, >> >> I am looking to introduce ABSU_EXPR and that would create: >> >> unsigned short res = ABSU_EXPR (short); >> >> Note that the argument is signed and

Re: Generating gimple assign stmt that changes sign

2018-05-21 Thread Jeff Law
On 05/21/2018 04:50 PM, Kugan Vivekanandarajah wrote: > Hi, > > I am looking to introduce ABSU_EXPR and that would create: > > unsigned short res = ABSU_EXPR (short); > > Note that the argument is signed and result is unsigned. As per the > review, I have a match.pd entry to generate this as: >