aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2014-01-20 18:59:14 +0100
committerUros Bizjak <uros@gcc.gnu.org>2014-01-20 18:59:14 +0100
commit3e7291458b963d37a9253cd5319ec50d292d5e72 (patch)
treeb628358572e088a7006cddd911df7ddaace9f7c1 /gcc/config
parentef132d593eb8b2423687ea820f01c4539c9f7151 (diff)
downloadgcc-3e7291458b963d37a9253cd5319ec50d292d5e72.zip
gcc-3e7291458b963d37a9253cd5319ec50d292d5e72.tar.gz
gcc-3e7291458b963d37a9253cd5319ec50d292d5e72.tar.bz2
i386.c (ix86_avoid_lea_for_addr): Return false for SImode_address_operand operands, having only a REG argument.
* config/i386/i386.c (ix86_avoid_lea_for_addr): Return false for SImode_address_operand operands, having only a REG argument. From-SVN: r206847
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.c13
-rw-r--r--gcc/config/i386/i386.md2
2 files changed, 7 insertions, 8 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 9991c30..1a4d568 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -18160,17 +18160,16 @@ ix86_avoid_lea_for_addr (rtx insn, rtx operands[])
return false;
/* The "at least two components" test below might not catch simple
- *mov[sd]i_internal or *zero_extendsidi2 insns if parts.base is
- non-NULL and parts.disp is const0_rtx as the only components in
- the address, e.g. if the register is %rbp or %r13. As this
- test is much cheaper and moves or zero extensions are the common
- case, do this check first. */
+ move or zero extension insns if parts.base is non-NULL and parts.disp
+ is const0_rtx as the only components in the address, e.g. if the
+ register is %rbp or %r13. As this test is much cheaper and moves or
+ zero extensions are the common case, do this check first. */
if (REG_P (operands[1])
- || (GET_CODE (operands[1]) == ZERO_EXTEND
+ || (SImode_address_operand (operands[1], VOIDmode)
&& REG_P (XEXP (operands[1], 0))))
return false;
- /* Check it is correct to split here. */
+ /* Check if it is OK to split here. */
if (!ix86_ok_to_clobber_flags (insn))
return false;
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 603fd8a..53edacf 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -5437,7 +5437,7 @@
/* Zero-extend return register to DImode for zero-extended addresses. */
if (mode != <MODE>mode)
emit_insn (gen_zero_extendsidi2
- (operands[0], gen_lowpart ((mode), operands[0])));
+ (operands[0], gen_lowpart (mode, operands[0])));
DONE;
}