mirror of git://gcc.gnu.org/git/gcc.git
[Patch 3/2 ifcvt costs] Don't expand a conditional move between identical sources
gcc/ * optabs.c (emit_condiitonal_move): Short circuit for identical sources. From-SVN: r238595
This commit is contained in:
parent
ebe8f3226c
commit
f5a459a439
|
|
@ -1,3 +1,8 @@
|
||||||
|
2016-07-21 James Greenhalgh <james.greenhalgh@arm.com>
|
||||||
|
|
||||||
|
* optabs.c (emit_condiitonal_move): Short circuit for identical
|
||||||
|
sources.
|
||||||
|
|
||||||
2016-07-21 James Greenhalgh <james.greenhalgh@arm.com>
|
2016-07-21 James Greenhalgh <james.greenhalgh@arm.com>
|
||||||
|
|
||||||
* ifcvt.c (noce_if_info): New fields: speed_p, original_cost,
|
* ifcvt.c (noce_if_info): New fields: speed_p, original_cost,
|
||||||
|
|
|
||||||
11
gcc/optabs.c
11
gcc/optabs.c
|
|
@ -4214,6 +4214,17 @@ emit_conditional_move (rtx target, enum rtx_code code, rtx op0, rtx op1,
|
||||||
enum insn_code icode;
|
enum insn_code icode;
|
||||||
enum rtx_code reversed;
|
enum rtx_code reversed;
|
||||||
|
|
||||||
|
/* If the two source operands are identical, that's just a move. */
|
||||||
|
|
||||||
|
if (rtx_equal_p (op2, op3))
|
||||||
|
{
|
||||||
|
if (!target)
|
||||||
|
target = gen_reg_rtx (mode);
|
||||||
|
|
||||||
|
emit_move_insn (target, op3);
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
/* If one operand is constant, make it the second one. Only do this
|
/* If one operand is constant, make it the second one. Only do this
|
||||||
if the other operand is not constant as well. */
|
if the other operand is not constant as well. */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue