Re: [PATCH 1/4] rs6000: build constant via li;rotldi

2023-06-13 Thread Jiufu Guo via Gcc-patches
Hi, David Edelsohn writes: > On Mon, Jun 12, 2023 at 11:30 PM Jiufu Guo wrote: >> >> >> Hi David, >> >> David Edelsohn writes: >> > On Wed, Jun 7, 2023 at 9:55 PM Jiufu Guo wrote: >> > >> > Hi, >> > >> > This patch checks if a constant is possible to be rotated to/from a >> > positive

Re: [PATCH 1/4] rs6000: build constant via li;rotldi

2023-06-13 Thread David Edelsohn via Gcc-patches
On Mon, Jun 12, 2023 at 11:30 PM Jiufu Guo wrote: > > > Hi David, > > David Edelsohn writes: > > On Wed, Jun 7, 2023 at 9:55 PM Jiufu Guo wrote: > > > > Hi, > > > > This patch checks if a constant is possible to be rotated to/from a > > positive > > or negative value from "li". If so, we

Re: [PATCH 1/4] rs6000: build constant via li;rotldi

2023-06-12 Thread Jiufu Guo via Gcc-patches
Hi David, David Edelsohn writes: > On Wed, Jun 7, 2023 at 9:55 PM Jiufu Guo wrote: > > Hi, > > This patch checks if a constant is possible to be rotated to/from a positive > or negative value from "li". If so, we could use "li;rotldi" to build it. > > Bootstrap and regtest pass on

Re: [PATCH 1/4] rs6000: build constant via li;rotldi

2023-06-10 Thread David Edelsohn via Gcc-patches
On Wed, Jun 7, 2023 at 9:55 PM Jiufu Guo wrote: > Hi, > > This patch checks if a constant is possible to be rotated to/from a > positive > or negative value from "li". If so, we could use "li;rotldi" to build it. > > Bootstrap and regtest pass on ppc64{,le}. > Is this ok for trunk? > > BR, >

[PATCH 1/4] rs6000: build constant via li;rotldi

2023-06-07 Thread Jiufu Guo via Gcc-patches
Hi, This patch checks if a constant is possible to be rotated to/from a positive or negative value from "li". If so, we could use "li;rotldi" to build it. Bootstrap and regtest pass on ppc64{,le}. Is this ok for trunk? BR, Jeff (Jiufu) gcc/ChangeLog: * config/rs6000/rs6000.cc

Re: [PATCH 1/4] rs6000: build constant via li;rotldi

2023-06-07 Thread Jiufu Guo via Gcc-patches
Hi David, David Edelsohn writes: > > Hi, Jiufu > * config/rs6000/rs6000.cc (can_be_rotated_to_possitive_li): New > function. > (can_be_rotated_to_negative_li): New function. > (can_be_built_by_li_and_rotldi): New function. > (rs6000_emit_set_long_const): Call

Re: [PATCH 1/4] rs6000: build constant via li;rotldi

2023-06-02 Thread David Edelsohn via Gcc-patches
Hi, Jiufu * config/rs6000/rs6000.cc (can_be_rotated_to_possitive_li): New function. (can_be_rotated_to_negative_li): New function. (can_be_built_by_li_and_rotldi): New function. (rs6000_emit_set_long_const): Call can_be_built_by_li_and_rotldi. In English the word

[PATCH 1/4] rs6000: build constant via li;rotldi

2023-02-03 Thread Jiufu Guo via Gcc-patches
Hi, This patch checks if a constant is possible to be rotated to/from a positive or negative value from "li". If so, we could use "li;rotldi" to build it. Bootstrap and regtest pass on ppc64{,le}. Is this ok for trunk or next stage1? BR, Jeff (Jiufu) gcc/ChangeLog: *