This is an archive of the discontinued LLVM Phabricator instance.

[ARM] CSEL generation
ClosedPublic

Authored by dmgreen on Jul 10 2020, 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.Jul 10 2020, 9:17 AM
simon_tatham accepted this revision.Jul 14 2020, 1:53 AM
This revision is now accepted and ready to land.Jul 14 2020, 1:53 AM
This revision was automatically updated to reflect the committed changes.