http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28685

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
   Target Milestone|---                         |4.8.0

--- Comment #18 from Uros Bizjak <ubizjak at gmail dot com> 2012-02-05 12:40:17 
UTC ---
(In reply to comment #17)
> The only one which is not fixed is comment #4

Following patch that enables post-reload compare elimination:

--cut here--
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c  (revision 183904)
+++ config/i386/i386.c  (working copy)
@@ -38685,6 +38685,9 @@
 #undef TARGET_EXPAND_TO_RTL_HOOK
 #define TARGET_EXPAND_TO_RTL_HOOK ix86_maybe_switch_abi

+#undef TARGET_FLAGS_REGNUM
+#define TARGET_FLAGS_REGNUM FLAGS_REG
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P ix86_legitimate_address_p

--cut here--

generates (-O2):

test:
        xorl    %edx, %edx
        cmpl    %esi, %edi
        movl    $1, %eax
        sete    %dl
        cmovge  %edx, %eax
        ret

Please note missing comparison.

This shows that the pass is effective for x86_64, but will be enabled for 4.8.

Reply via email to