Re: ifcvt vs. expand_binop

2015-09-22 Thread Oleg Endo
On Wed, 2015-09-23 at 00:48 +0900, Oleg Endo wrote: > I haven't checked the details. But I guess because expand_binop wants > to somehow reuse the input and output it creates a DImode pseudo, puts > the input there, does the DImode plus and the returned "target" is a > SImode subreg of the DImode

Re: ifcvt vs. expand_binop

2015-09-22 Thread Oleg Endo
On Tue, 2015-09-22 at 17:53 +0200, Bernd Schmidt wrote: > On 09/22/2015 03:35 PM, Oleg Endo wrote: > > On SH, the result of comparisons etc. is stored in the T_REG. It's a 1 > > bit reg but described as SImode. To get the T_REG into another reg, > > there's this insn: > > > > (define_insn "movt"

Re: ifcvt vs. expand_binop

2015-09-22 Thread Bernd Schmidt
On 09/22/2015 03:35 PM, Oleg Endo wrote: On SH, the result of comparisons etc. is stored in the T_REG. It's a 1 bit reg but described as SImode. To get the T_REG into another reg, there's this insn: (define_insn "movt" [(set (match_operand:SI 0 "arith_reg_dest" "=r") (match_operand:

Re: ifcvt vs. expand_binop

2015-09-22 Thread Oleg Endo
Hi, On Tue, 2015-09-22 at 15:21 +0100, Kyrill Tkachov wrote: > where does noce_emit_store_flag call expand_simple_binop? > Do you mean the code following the call to noce_emit_store_flag > in noce_try_store_flag_constants? (I suspect that's the code that > will get triggered for your testcase) S

Re: ifcvt vs. expand_binop

2015-09-22 Thread Kyrill Tkachov
Hi Oleg, On 22/09/15 14:35, Oleg Endo wrote: On SH, the result of comparisons etc. is stored in the T_REG. It's a 1 bit reg but described as SImode. To get the T_REG into another reg, there's this insn: (define_insn "movt" [(set (match_operand:SI 0 "arith_reg_dest" "=r") (match_ope

ifcvt vs. expand_binop

2015-09-22 Thread Oleg Endo
On SH, the result of comparisons etc. is stored in the T_REG. It's a 1 bit reg but described as SImode. To get the T_REG into another reg, there's this insn: (define_insn "movt" [(set (match_operand:SI 0 "arith_reg_dest" "=r") (match_operand:SI 1 "t_reg_operand"))] "TARGET_SH1" "mo