http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53791
--- Comment #2 from Steven Bosscher <steven at gcc dot gnu.org> 2012-06-28 12:05:38 UTC --- (In reply to comment #1) > The other trivially obvious possibility is to pattern-match this open-coded > switch/case and transform it back to switch/case early. The test case is a simplified example. More complex predicates may not be transformed to a switch. Also, the point is that this kind of code results from lowering of switches to the series of if-branches. (What my emit_case_bit_tests patch does, actually, is to output the branch with the highest count first. But that means I have to lower after reading in the profile.) I'm looking at "Efficient and effective branch reordering using profile data" (2002) to see if this is something that could be implemented for GCC...