Re: [PATCH 06/15] rs6000: Use rldiwi in constant construction

2015-08-13 Thread Joseph Myers
On Thu, 13 Aug 2015, Mike Stump wrote: > On Aug 12, 2015, at 7:43 PM, Segher Boessenkool > wrote: > > Yes. And there are much worse problems, like many things not working > > right if your HOST_WIDE_INT would happen to be more than 64 bits; we > > cannot really shake those out because there is

Re: [PATCH 06/15] rs6000: Use rldiwi in constant construction

2015-08-13 Thread Mike Stump
On Aug 12, 2015, at 7:43 PM, Segher Boessenkool wrote: > Yes. And there are much worse problems, like many things not working > right if your HOST_WIDE_INT would happen to be more than 64 bits; we > cannot really shake those out because there is no actual system to > test that on -- but it also

Re: [PATCH 06/15] rs6000: Use rldiwi in constant construction

2015-08-12 Thread Segher Boessenkool
On Wed, Aug 12, 2015 at 08:55:51AM -0700, Richard Henderson wrote: > On 08/12/2015 07:02 AM, Segher Boessenkool wrote: > > On Tue, Aug 11, 2015 at 06:11:35PM -0700, Richard Henderson wrote: > >> @@ -8173,6 +8173,13 @@ genimm_ppc::exam_search (HOST_WIDE_INT c, int > >> budget) > >>if (exam_mask

Re: [PATCH 06/15] rs6000: Use rldiwi in constant construction

2015-08-12 Thread Richard Henderson
On 08/12/2015 07:02 AM, Segher Boessenkool wrote: > On Tue, Aug 11, 2015 at 06:11:35PM -0700, Richard Henderson wrote: >> @@ -8173,6 +8173,13 @@ genimm_ppc::exam_search (HOST_WIDE_INT c, int budget) >>if (exam_mask (-1, c, sub_budget)) >> return true; >> >> + /* If the two halves are eq

Re: [PATCH 06/15] rs6000: Use rldiwi in constant construction

2015-08-12 Thread Segher Boessenkool
On Tue, Aug 11, 2015 at 06:11:35PM -0700, Richard Henderson wrote: > @@ -8173,6 +8173,13 @@ genimm_ppc::exam_search (HOST_WIDE_INT c, int budget) >if (exam_mask (-1, c, sub_budget)) > return true; > > + /* If the two halves are equal, use an insert. */ > + if (c >> 32 == test && exam_

[PATCH 06/15] rs6000: Use rldiwi in constant construction

2015-08-11 Thread Richard Henderson
Save 2 insns for constants like 0x where the low 32-bits can be replicated to the high 32-bits. Cc: David Edelsohn --- * config/rs6000/rs6000.c (genimm_ppc::exam_search): Check for two equal 32-bit pieces. (genimm_ppc::generate): Handle VEC_DUPLICATE. ---