------- Comment #8 from law at redhat dot com 2010-02-24 21:20 ------- This was fixed at some point; I don't know if it was the patch referenced in comment #6, or some other patch or some combination thereof.
You can see that probabilities are being propagated down through to the scheduler by looking at the .sched dump: (insn 9 7 10 2 j.c:8 (set (cc0) (compare (reg:SI 39 [ prephitmp___4 ]) (reg:SI 42))) 8 {*cmpsi} (expr_list:REG_DEAD (reg:SI 42) (expr_list:REG_EQUAL (compare (reg:SI 39 [ prephitmp___4 ]) (const_int -125 [0xffffffffffffff83])) (nil)))) (jump_insn 10 9 11 2 j.c:8 (set (pc) (if_then_else (lt (cc0) (const_int 0 [0x0])) (label_ref 15) (pc))) 41 {*branch_normal} (expr_list:REG_BR_PROB (const_int 9996 [0x270c]) (nil)) -> 15) ;; End of basic block 2 -> ( 3 4) ;; lr out 3 [sp] 29 [r29] 32 [.fp] 33 [.ap] 39 ;; live out 3 [sp] 29 [r29] 32 [.fp] 33 [.ap] 39 ;; Succ edge 3 [0.0%] (fallthru) ;; Succ edge 4 [100.0%] Note how the probability of the edge 2->3 is now zero, reflecting the unlikely attribute while the edge 2->4 is 100%. With the correct probabilities the scheduler naturally does the right thing. -- law at redhat dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9240