[Bug target/39942] Nonoptimal code - leaveq; xchg %ax,%ax; retq
jakub at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri May 15 16:25:00 GMT 2009
------- Comment #41 from jakub at gcc dot gnu dot org 2009-05-15 16:24 -------
The 34 resp. 51 4 branches in 16 byte page with the 3 patches together made me
look at one of the cases which was wrong and the problem is that cmp $0x1d, %al
has too large get_attr_lenght (insn) returned, 3 instead of 2, because GCC
thinks it has modrm byte when it has not.
Testing:
--- gcc/config/i386/i386.md.jj2009-05-13 08:42:51.000000000 +0200
+++ gcc/config/i386/i386.md2009-05-15 18:06:40.000000000 +0200
@@ -504,6 +504,9 @@
(and (eq_attr "type" "callv")
(match_operand 1 "constant_call_address_operand" ""))
(const_int 0)
+ (and (eq_attr "type" "alu,alu1,icmp,test")
+ (match_operand 0 "ax_reg_operand" ""))
+ (symbol_ref "(get_attr_length_immediate (insn) > (get_attr_mode (insn) !=
MODE_QI))")
]
(const_int 1)))
now on top of the 3 patches (without the 4th) to see what it does to code size
and number of 4+ branches in 16 byte page.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39942
More information about the Gcc-bugs
mailing list