i386.c (ix86_split_long_move): When optimizing for size...
* config/i386/i386.c (ix86_split_long_move): When optimizing for size, and the low and high parts of a DImode constant are equal, copy one register to another instead of loading the same immediate value twice. From-SVN: r87270
This commit is contained in:
parent
469c26f167
commit
903a5059b6
@ -1,3 +1,10 @@
|
||||
2004-09-09 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
* config/i386/i386.c (ix86_split_long_move): When optimizing for
|
||||
size, and the low and high parts of a DImode constant are equal,
|
||||
copy one register to another instead of loading the same immediate
|
||||
value twice.
|
||||
|
||||
2004-09-09 Richard Henderson <rth@redhat.com>
|
||||
|
||||
PR middle-end/17367
|
||||
|
@ -9938,6 +9938,33 @@ ix86_split_long_move (rtx operands[])
|
||||
operands[6] = part[1][1];
|
||||
}
|
||||
}
|
||||
|
||||
/* If optimizing for size, attempt to locally unCSE non-zero constants. */
|
||||
if (optimize_size)
|
||||
{
|
||||
if (GET_CODE (operands[5]) == CONST_INT
|
||||
&& operands[5] != const0_rtx
|
||||
&& REG_P (operands[2]))
|
||||
{
|
||||
if (GET_CODE (operands[6]) == CONST_INT
|
||||
&& INTVAL (operands[6]) == INTVAL (operands[5]))
|
||||
operands[6] = operands[2];
|
||||
|
||||
if (nparts == 3
|
||||
&& GET_CODE (operands[7]) == CONST_INT
|
||||
&& INTVAL (operands[7]) == INTVAL (operands[5]))
|
||||
operands[7] = operands[2];
|
||||
}
|
||||
|
||||
if (nparts == 3
|
||||
&& GET_CODE (operands[6]) == CONST_INT
|
||||
&& operands[6] != const0_rtx
|
||||
&& REG_P (operands[3])
|
||||
&& GET_CODE (operands[7]) == CONST_INT
|
||||
&& INTVAL (operands[7]) == INTVAL (operands[6]))
|
||||
operands[7] = operands[3];
|
||||
}
|
||||
|
||||
emit_move_insn (operands[2], operands[5]);
|
||||
emit_move_insn (operands[3], operands[6]);
|
||||
if (nparts == 3)
|
||||
|
Loading…
Reference in New Issue
Block a user