diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-19 15:48:14 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-19 15:48:14 +0000 |
commit | 506a92bc8eff685c64eebbe861a30aedf2c380fb (patch) | |
tree | 8b99085a960212c67175aa4b01a1d3bbccfd66fc /gcc/config/i386 | |
parent | 4aadd22acd34bb156219867fc52212379f541a0c (diff) | |
download | gcc-506a92bc8eff685c64eebbe861a30aedf2c380fb.tar.gz |
PR target/59379
* config/i386/i386.md (*lea<mode>): Zero-extend return register
to DImode for zero-extended addresses.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206774 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386')
-rw-r--r-- | gcc/config/i386/i386.md | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index e30f389be1d..603fd8a616b 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -5428,12 +5428,17 @@ operands[0] = SET_DEST (pat); operands[1] = SET_SRC (pat); - /* Emit all operations in SImode for zero-extended addresses. Recall - that x86_64 inheretly zero-extends SImode operations to DImode. */ + /* Emit all operations in SImode for zero-extended addresses. */ if (SImode_address_operand (operands[1], VOIDmode)) mode = SImode; ix86_split_lea_for_addr (curr_insn, operands, mode); + + /* 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]))); + DONE; } [(set_attr "type" "lea") |