Page MenuHomePhabricator

[ARM] CSEL generation
ClosedPublic

Authored by dmgreen on Fri, Jul 10, 9:17 AM.

Details

Summary

This adds a peephole optimisation to turn a t2MOVccr that could not be folded into any other instruction into a CSEL on 8.1-m. The t2MOVccr would usually be expanded into a conditional mov, that becomes an IT; MOV pair. We can instead generate a CSEL instruction, which can potentially be smaller and allows better register allocation freedom, which can help reduce codesize. Performance is more variable and may depend on the micrarchitecture details, but initial results look good. If we need to control this per-cpu, we can add a subtarget feature as we need it.

Original patch by David Penry.

Diff Detail

Event Timeline

dmgreen created this revision.Fri, Jul 10, 9:17 AM
simon_tatham accepted this revision.Tue, Jul 14, 1:53 AM
This revision is now accepted and ready to land.Tue, Jul 14, 1:53 AM
This revision was automatically updated to reflect the committed changes.