Commit 2c03791b by H.J. Lu Committed by H.J. Lu

Use ADD if result isn't used in memory address.

2010-09-14  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_lea_for_add_ok): Return false if
	result isn't used in memory address.

From-SVN: r164287
parent 26983c22
2010-09-14 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (ix86_lea_for_add_ok): Return false if
result isn't used in memory address.
2010-09-14 H.J. Lu <hongjiu.lu@intel.com>
* defaults.h (UNITS_PER_SIMD_WORD): Removed.
* config/arm/arm.h (UNITS_PER_SIMD_WORD): Likewise.
* config/i386/i386.h (UNITS_PER_SIMD_WORD): Likewise.
......
......@@ -14871,15 +14871,19 @@ ix86_lea_for_add_ok (rtx insn, rtx operands[])
else
{
int dist_define, dist_use;
/* Return false if REGNO0 isn't used in memory address. */
dist_use = distance_agu_use (regno0, insn);
if (dist_use <= 0)
return false;
dist_define = distance_non_agu_define (regno1, regno2, insn);
if (dist_define <= 0)
return true;
/* If this insn has both backward non-agu dependence and forward
agu dependence, the one with short distance take effect. */
dist_use = distance_agu_use (regno0, insn);
if (dist_use <= 0
|| (dist_define + IX86_LEA_PRIORITY) < dist_use)
if ((dist_define + IX86_LEA_PRIORITY) < dist_use)
return false;
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment