This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hello!
Attached patch removes a hack from add patterns, where lea insn was
output directly from add patterns. This is not correct, since lea
doesn't change flags. The patch changes add patterns to split relevant
add patterns to lea using existing splitters. This change uncovered a
small problem, where ix86_gen_add3 generated nonexistent add pattern,
where operand[0] != operand[1]. Lea handles this pattern just fine.
The patch also removes ineffective alternative from add{si,di} pattern,
since this alternative was shadowed by alternative 1. The patch also
fixes a couple of inconsistencies, found by eyeballing lea patterns.
2010-06-07 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*add<mode>_1): Remove alternative 2.
<TYPE_LEA>: Split instruction.
<default>: Remove alternative 2 handling.
(*addsi_1_zext) <TYPE_LEA>: Split instruction.
(add lea splitter): Generate SImode lea for mode sizes <= SImode.
(add_zext lea splitter): Use ix86_lea_for_add_ok in insn predicate.
(*movsi_1) <TYPE_LEA>: Use %a modifier to output operand 1.
(ashift_zext lea splitter): Use DImode for multiplication.
* config/i386/i386.c (ix86_expand_epilogue): Do not use ix86_gen_add
to generate addition.
Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu
{,-m32} and was committed to mainline.
Last three changes will be backported to other release branches.
Uros.
Attachment:
p.diff.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |