The -mdiv=inv:minlat option no longer rearranges the computations; It appears the combiner pattern falls foul of the combine_validate_cost check. The assumed cost of the three constituent instructions is 4 each, while the cost of the combined instruction is assumed to be 16. sh_rtx_costs needs to be adjusted to make sure that the combination happens; preferrably give the constituent insns a realistic cost.
-mdiv=inv:call performs the transformation, but the transformed instruction is not recognized, causing an ICE. testcase (add -O2 to options): int f (int a, int b) { return a/b; } -- Summary: sh64-elf -mdiv= options bitrot Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, missed-optimization Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: amylaar at gcc dot gnu dot org GCC target triplet: sh64-elf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28791