Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-12-03 Thread Bin.Cheng
On Thu, Dec 3, 2015 at 6:26 PM, Richard Earnshaw wrote: > On 03/12/15 05:26, Bin.Cheng wrote: >> On Tue, Dec 1, 2015 at 6:25 PM, Richard Earnshaw >> wrote: >>> On 01/12/15 03:19, Bin.Cheng wrote: On Tue, Nov 24, 2015 at 6:18 PM,

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-12-03 Thread Richard Earnshaw
On 03/12/15 05:26, Bin.Cheng wrote: > On Tue, Dec 1, 2015 at 6:25 PM, Richard Earnshaw > wrote: >> On 01/12/15 03:19, Bin.Cheng wrote: >>> On Tue, Nov 24, 2015 at 6:18 PM, Richard Earnshaw >>> wrote: On 24/11/15 09:56, Richard

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-12-02 Thread Bin.Cheng
On Tue, Dec 1, 2015 at 6:25 PM, Richard Earnshaw wrote: > On 01/12/15 03:19, Bin.Cheng wrote: >> On Tue, Nov 24, 2015 at 6:18 PM, Richard Earnshaw >> wrote: >>> On 24/11/15 09:56, Richard Earnshaw wrote: On 24/11/15 02:51,

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-12-01 Thread Richard Earnshaw
On 01/12/15 03:19, Bin.Cheng wrote: > On Tue, Nov 24, 2015 at 6:18 PM, Richard Earnshaw > wrote: >> On 24/11/15 09:56, Richard Earnshaw wrote: >>> On 24/11/15 02:51, Bin.Cheng wrote: >> The aarch64's problem is we don't define addptr3 pattern, and we don't

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-30 Thread Bin.Cheng
On Tue, Nov 24, 2015 at 6:18 PM, Richard Earnshaw wrote: > On 24/11/15 09:56, Richard Earnshaw wrote: >> On 24/11/15 02:51, Bin.Cheng wrote: > The aarch64's problem is we don't define addptr3 pattern, and we don't >>> have direct insn pattern describing the

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-24 Thread Bin.Cheng
On Tue, Nov 24, 2015 at 5:56 PM, Richard Earnshaw wrote: > On 24/11/15 02:51, Bin.Cheng wrote: The aarch64's problem is we don't define addptr3 pattern, and we don't >> have direct insn pattern describing the "x + y << z". According to >> gcc

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-24 Thread Richard Earnshaw
On 24/11/15 09:56, Richard Earnshaw wrote: > On 24/11/15 02:51, Bin.Cheng wrote: The aarch64's problem is we don't define addptr3 pattern, and we don't >> have direct insn pattern describing the "x + y << z". According to >> gcc internal: >> >> ‘addptrm3’ >> Like addm3

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-24 Thread Richard Earnshaw
On 24/11/15 02:51, Bin.Cheng wrote: >>> The aarch64's problem is we don't define addptr3 pattern, and we don't >>> >> have direct insn pattern describing the "x + y << z". According to >>> >> gcc internal: >>> >> >>> >> ‘addptrm3’ >>> >> Like addm3 but is guaranteed to only be used for address

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-24 Thread Jiong Wang
On 24/11/15 13:23, Richard Earnshaw wrote: On 24/11/15 13:06, Jiong Wang wrote: On 24/11/15 10:18, Richard Earnshaw wrote: I presume you are aware of the canonicalization rules for add? That is, for a shift-and-add operation, the shift operand must appear first. Ie. (plus (shift (op,

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-24 Thread Richard Earnshaw
On 24/11/15 14:36, Jiong Wang wrote: > > > On 24/11/15 13:23, Richard Earnshaw wrote: >> On 24/11/15 13:06, Jiong Wang wrote: >>> >>> On 24/11/15 10:18, Richard Earnshaw wrote: I presume you are aware of the canonicalization rules for add? That is, for a shift-and-add operation,

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-24 Thread Richard Earnshaw
On 24/11/15 13:06, Jiong Wang wrote: > > > On 24/11/15 10:18, Richard Earnshaw wrote: >> I presume you are aware of the canonicalization rules for add? That is, >> for a shift-and-add operation, the shift operand must appear first. Ie. >> >> (plus (shift (op, op)), op) >> >> not >> >> (plus

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-24 Thread Jiong Wang
On 24/11/15 10:18, Richard Earnshaw wrote: I presume you are aware of the canonicalization rules for add? That is, for a shift-and-add operation, the shift operand must appear first. Ie. (plus (shift (op, op)), op) not (plus (op, (shift (op, op)) R. Looks to me it's not optimal to

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-23 Thread Bin.Cheng
On Sat, Nov 21, 2015 at 1:39 AM, Richard Earnshaw wrote: > On 20/11/15 08:31, Bin.Cheng wrote: >> On Thu, Nov 19, 2015 at 10:32 AM, Bin.Cheng wrote: >>> On Tue, Nov 17, 2015 at 6:08 PM, James Greenhalgh >>> wrote:

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-20 Thread Richard Earnshaw
On 20/11/15 08:31, Bin.Cheng wrote: > On Thu, Nov 19, 2015 at 10:32 AM, Bin.Cheng wrote: >> On Tue, Nov 17, 2015 at 6:08 PM, James Greenhalgh >> wrote: >>> On Tue, Nov 17, 2015 at 05:21:01PM +0800, Bin Cheng wrote: Hi, GIMPLE IVO needs

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-20 Thread Bin.Cheng
On Thu, Nov 19, 2015 at 10:32 AM, Bin.Cheng wrote: > On Tue, Nov 17, 2015 at 6:08 PM, James Greenhalgh > wrote: >> On Tue, Nov 17, 2015 at 05:21:01PM +0800, Bin Cheng wrote: >>> Hi, >>> GIMPLE IVO needs to call backend interface to calculate costs

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-18 Thread Bin.Cheng
On Tue, Nov 17, 2015 at 6:08 PM, James Greenhalgh wrote: > On Tue, Nov 17, 2015 at 05:21:01PM +0800, Bin Cheng wrote: >> Hi, >> GIMPLE IVO needs to call backend interface to calculate costs for addr >> expressions like below: >>FORM1: "r73 + r74 + 16380" >>FORM2:

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-17 Thread James Greenhalgh
On Tue, Nov 17, 2015 at 05:21:01PM +0800, Bin Cheng wrote: > Hi, > GIMPLE IVO needs to call backend interface to calculate costs for addr > expressions like below: >FORM1: "r73 + r74 + 16380" >FORM2: "r73 << 2 + r74 + 16380" > > They are invalid address expression on AArch64, so will be

[PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-17 Thread Bin Cheng
Hi, GIMPLE IVO needs to call backend interface to calculate costs for addr expressions like below: FORM1: "r73 + r74 + 16380" FORM2: "r73 << 2 + r74 + 16380" They are invalid address expression on AArch64, so will be legitimized by aarch64_legitimize_address. Below are what we got from