http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
Bug #: 54240 Summary: Routine hoist_adjacent_loads does not work properly after r189366 Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: ysrum...@gmail.com This regression can be seen in the attached simple test-case - cmov conversion is not happened. The fix is evident: --- tree-ssa-phiopt.c (revision 190151) +++ tree-ssa-phiopt.c (working copy) @@ -1864,7 +1864,7 @@ /* Check the mode of the arguments to be sure a conditional move can be generated for it. */ - if (!optab_handler (cmov_optab, TYPE_MODE (TREE_TYPE (arg1)))) + if (optab_handler (cmov_optab, TYPE_MODE (TREE_TYPE (arg1)) == CODE_FOR_nothing)) continue; /* Both statements must be assignments whose RHS is a COMPONENT_REF. */ You can see this regression on any platform supporting conditional moves (I tested it on x86).