[PATCH 3/9] S/390: Get rid of Y constraint in rotate patterns.

2016-02-29 Thread Andreas Krebbel
This patch introduces substitution patterns to add PLUS const_int, and AND operands to patterns and uses this to rewrite the existing rotate pattern. gcc/ChangeLog: 2016-02-29 Andreas Krebbel * config/s390/predicates.md (const_int_6bitset_operand): New predicates. * co

Re: [PATCH 3/9] S/390: Get rid of Y constraint in rotate patterns.

2016-02-25 Thread Ulrich Weigand
Andreas Krebbel wrote: > * config/s390/predicates.md (const_int_6bitset_operand): New > predicates. > * config/s390/s390.md: Include subst.md. > ("rotl3"): New expander. > ("rotl3", "*rotl3_and"): Merge insn definitions into > ... > ("*rotl3"): New insn

[PATCH 3/9] S/390: Get rid of Y constraint in rotate patterns.

2016-02-23 Thread Andreas Krebbel
This patch introduces substitution patterns to add PLUS const_int, and AND operands to patterns and uses this to rewrite the existing rotate pattern. gcc/ChangeLog: * config/s390/predicates.md (const_int_6bitset_operand): New predicates. * config/s390/s390.md: Include subs

Re: [PATCH 3/9] S/390: Get rid of Y constraint in rotate patterns.

2016-02-01 Thread Ulrich Weigand
Andreas Krebbel wrote: > > Hmm. In theory reload should always respect both constraints and > > predicates. > > But I guess it can't hurt to disable the alternative just to be safe; it is > > indeed an uncommon case to have the constraint accept more than the > > predicate. > > (Also a PLUS with

Re: [PATCH 3/9] S/390: Get rid of Y constraint in rotate patterns.

2016-02-01 Thread Andreas Krebbel
On 02/01/2016 05:58 PM, Ulrich Weigand wrote: > Andreas Krebbel wrote: >> On 02/01/2016 02:30 PM, Ulrich Weigand wrote: >>> This seems to add just a single alternative. Is that OK if it gets >>> substituted into a pattern that used multiple alternatives otherwise? >> Yes. This is supposed to work

Re: [PATCH 3/9] S/390: Get rid of Y constraint in rotate patterns.

2016-02-01 Thread Ulrich Weigand
Andreas Krebbel wrote: > On 02/01/2016 02:30 PM, Ulrich Weigand wrote: > > This seems to add just a single alternative. Is that OK if it gets > > substituted into a pattern that used multiple alternatives otherwise? > Yes. This is supposed to work. The new constraint will be duplicated until >

Re: [PATCH 3/9] S/390: Get rid of Y constraint in rotate patterns.

2016-02-01 Thread Andreas Krebbel
On 02/01/2016 02:30 PM, Ulrich Weigand wrote: > Andreas Krebbel wrote: > >> +; Accept single register and immediate operands usable as shift >> +; counts. >> +(define_predicate "addrreg_or_constint_operand" >> + (match_code "reg, subreg, const_int") > > I'm wondering whether this is even necessa

Re: [PATCH 3/9] S/390: Get rid of Y constraint in rotate patterns.

2016-02-01 Thread Ulrich Weigand
Andreas Krebbel wrote: > +; Accept single register and immediate operands usable as shift > +; counts. > +(define_predicate "addrreg_or_constint_operand" > + (match_code "reg, subreg, const_int") I'm wondering whether this is even necessary. > +{ > + if (GET_MODE (op) != VOIDmode > + && G

[PATCH 3/9] S/390: Get rid of Y constraint in rotate patterns.

2016-01-14 Thread Andreas Krebbel
This patch introduces substitution patterns to add PLUS const_int, and AND operands to patterns and uses this to rewrite the existing rotate pattern. gcc/ChangeLog: 2016-01-14 Andreas Krebbel * config/s390/predicates.md (addrreg_or_constint_operand) (const_int_6bitset_operand)