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

chrbr at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2013-12-3
                 CC|                            |olegendo at gcc dot gnu.org

--- Comment #5 from chrbr at gcc dot gnu.org ---
seems a wrong T-bit optimization.

we have 

.L3:
tst    r1,r1
    bt

replaced by
.L3:
    bf    .L4

although the r1 value can have defs reached from several path.

This has been fixed by Oleg in the 4.9 with a new cflow pass. In 4.8 I think
it's best to just disable it as unsafe, The following workaround is enough to
to fix the problem:

Index: sh.md
===================================================================
--- sh.md       (revision 205585)
+++ sh.md       (working copy)
@@ -8380,7 +8380,7 @@ label:
 {
   return output_branch (sh_eval_treg_value (operands[1]), insn, operands);
 }
-  "&& 1"
+  "&& 0"
   [(set (pc) (if_then_else (eq (reg:SI T_REG) (match_dup 2))
                           (label_ref (match_dup 0))
                           (pc)))]

do you agree Oleg ?

Reply via email to