On Wed, 2014-01-15 at 22:47 -0700, Jeff Law wrote:
> > No, this really should be fixed in the target side. In fact for MIPS
> > there is an instruction which does a conditional move based on the FP
> > CC register (movt/movf). So you need to look into why the wrong
> > pattern is being selected instead.
> Or maybe during expansion.
>
> jeff
It looks like this is going wrong in combine. Before combine I have:
(insn 75 74 76 4 (set (reg:SI 240)
(if_then_else:SI (ne:CC (reg:CC 67 $fcc0)
(const_int 0 [0]))
(reg:SI 228 [ D.1939+-3 ])
(reg:SI 246))) 609 {*movsi_on_cc}
(expr_list:REG_DEAD (reg:SI 228 [ D.1939+-3 ])
(expr_list:REG_DEAD (reg:CC 67 $fcc0)
(expr_list:REG_EQUAL (if_then_else:SI (ne:CC (reg:CC 67 $fcc0)
(const_int 0 [0]))
(reg:SI 228 [ D.1939+-3 ])
(const_int 1 [0x1]))
(nil)))))
(insn 76 75 77 4 (set (reg:SI 228 [ D.1939+-3 ])
(zero_extend:SI (subreg:QI (reg:SI 240) 3))) 185 {*zero_extendqisi2}
(expr_list:REG_DEAD (reg:SI 240)
(nil)))
After combine I have:
(note 75 74 76 4 NOTE_INSN_DELETED)
(insn 76 75 77 4 (set (reg:SI 228 [ D.1939+-3 ])
(if_then_else:SI (ne:SI (reg:CC 67 $fcc0)
(const_int 0 [0]))
(reg:SI 228 [ D.1939+-3 ])
(reg:SI 246))) 609 {*movsi_on_cc}
(expr_list:REG_DEAD (reg:CC 67 $fcc0)
(nil)))
The ne:CC in instruction 75 has become a ne:SI in instruction 76 after the
combine.
Steve Ellcey
[email protected]