From 72b7c4bc78f0c99a9b79a33b3a50fa9367b15782 Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Mon, 18 Nov 2013 19:20:12 +0000 Subject: [PATCH] re PR middle-end/56552 (conditional move can generate unnecessary conversion code) 2013-11-18 Andrew Pinski Steve Ellcey PR target/56552 * config/mips/mips.md (*mov_on_): Remove type restriction from equality_operator on conditonal move. (*mov_on_): Ditto. (*mov_on__ne): New. Co-Authored-By: Steve Ellcey From-SVN: r204979 --- gcc/ChangeLog | 9 +++++++++ gcc/config/mips/mips.md | 17 +++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d61b494..3e88c04 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2013-11-18 Andrew Pinski + Steve Ellcey + + PR target/56552 + * config/mips/mips.md (*mov_on_): Remove + type restriction from equality_operator on conditonal move. + (*mov_on_): Ditto. + (*mov_on__ne): New. + 2013-11-18 Jeff Law * tree-ssa-threadupdate.c: Fix file block comment. diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 3554beb..6991f20 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -6776,7 +6776,7 @@ (define_insn "*mov_on_" [(set (match_operand:GPR 0 "register_operand" "=d,d") (if_then_else:GPR - (match_operator:MOVECC 4 "equality_operator" + (match_operator 4 "equality_operator" [(match_operand:MOVECC 1 "register_operand" ",") (const_int 0)]) (match_operand:GPR 2 "reg_or_0_operand" "dJ,0") @@ -6788,10 +6788,23 @@ [(set_attr "type" "condmove") (set_attr "mode" "")]) +(define_insn "*mov_on__ne" + [(set (match_operand:GPR 0 "register_operand" "=d,d") + (if_then_else:GPR + (match_operand:GPR2 1 "register_operand" ",") + (match_operand:GPR 2 "reg_or_0_operand" "dJ,0") + (match_operand:GPR 3 "reg_or_0_operand" "0,dJ")))] + "ISA_HAS_CONDMOVE" + "@ + movn\t%0,%z2,%1 + movz\t%0,%z3,%1" + [(set_attr "type" "condmove") + (set_attr "mode" "")]) + (define_insn "*mov_on_" [(set (match_operand:SCALARF 0 "register_operand" "=f,f") (if_then_else:SCALARF - (match_operator:MOVECC 4 "equality_operator" + (match_operator 4 "equality_operator" [(match_operand:MOVECC 1 "register_operand" ",") (const_int 0)]) (match_operand:SCALARF 2 "register_operand" "f,0") -- 2.7.4