Re: [PATCH] rs6000: Fix PR67344

2015-08-25 Thread Alan Modra
On Tue, Aug 25, 2015 at 07:09:48PM -0500, Segher Boessenkool wrote: > On Wed, Aug 26, 2015 at 08:40:49AM +0930, Alan Modra wrote: > > On Tue, Aug 25, 2015 at 10:08:54AM -0700, Segher Boessenkool wrote: > > > -(define_insn_and_split "*and3_imm_dot_shifted" > > > - [(set (match_operand:CC 3 "cc_reg_

Re: [PATCH] rs6000: Fix PR67344

2015-08-25 Thread Segher Boessenkool
On Wed, Aug 26, 2015 at 08:40:49AM +0930, Alan Modra wrote: > On Tue, Aug 25, 2015 at 10:08:54AM -0700, Segher Boessenkool wrote: > > -(define_insn_and_split "*and3_imm_dot_shifted" > > - [(set (match_operand:CC 3 "cc_reg_operand" "=x,?y") > > +(define_insn "*and3_imm_dot_shifted" > > + [(set (ma

Re: [PATCH] rs6000: Fix PR67344

2015-08-25 Thread Alan Modra
On Tue, Aug 25, 2015 at 10:08:54AM -0700, Segher Boessenkool wrote: > -(define_insn_and_split "*and3_imm_dot_shifted" > - [(set (match_operand:CC 3 "cc_reg_operand" "=x,?y") > +(define_insn "*and3_imm_dot_shifted" > + [(set (match_operand:CC 3 "cc_reg_operand" "=x") Is this really the best solut

Re: [PATCH] rs6000: Fix PR67344

2015-08-25 Thread David Edelsohn
On Tue, Aug 25, 2015 at 1:08 PM, Segher Boessenkool wrote: > The "*and3_imm_dot_shifted" pattern is a define_insn_and_split, > like most "dot" patterns: if its output is not assigned cr0 but some > other cr reg, it splits to a non-dot insn and a compare. > > Unfortunately that non-dot insn will cl

[PATCH] rs6000: Fix PR67344

2015-08-25 Thread Segher Boessenkool
The "*and3_imm_dot_shifted" pattern is a define_insn_and_split, like most "dot" patterns: if its output is not assigned cr0 but some other cr reg, it splits to a non-dot insn and a compare. Unfortunately that non-dot insn will clobber cr0 as well. We could add another clobber (with "=X,x"), but t