From 98fbe28d1ea9be47419a759a1e3c0653309f44fb Mon Sep 17 00:00:00 2001 From: uros Date: Mon, 20 Jan 2014 17:59:14 +0000 Subject: [PATCH] * config/i386/i386.c (ix86_avoid_lea_for_addr): Return false for SImode_address_operand operands, having only a REG argument. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206847 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 13 ++++++------- gcc/config/i386/i386.md | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cd9667c0cbe..a199b8da959 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-01-20 Uros Bizjak + + * config/i386/i386.c (ix86_avoid_lea_for_addr): Return false + for SImode_address_operand operands, having only a REG argument. + 2014-01-20 Marcus Shawcroft * config/aarch64/aarch64-linux.h (GLIBC_DYNAMIC_LINKER): Expand diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 9991c30b11c..1a4d5683e34 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 603fd8a616b..53edacf9e41 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) emit_insn (gen_zero_extendsidi2 - (operands[0], gen_lowpart ((mode), operands[0]))); + (operands[0], gen_lowpart (mode, operands[0]))); DONE; } -- 2.11.4.GIT