This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Update check for CBZ in Ifcvt
ClosedPublic

Authored by dmgreen on Apr 1 2019, 12:24 PM.

Details

Summary

This check in ifcvt mirrors the same one in constant island pass, for when a CBZ will be preferable to a IT block. The version in constant islands was updated recently to search backwards for CMP's, so this version should be updated too. (The code should probably be shared between the two, but I'm not sure exactly where that should go. I'm happy to move it.)

I was having trouble getting this to happen in a llc test without registry spilling or a schedule. MIR tests show the differences though. Test is new, I'm just showing the differences here for clarity.

Diff Detail

Repository
rL LLVM

Event Timeline

dmgreen created this revision.Apr 1 2019, 12:24 PM

Yes, please refactor the code. We define a bunch of helpers in ARMBaseInstrInfo.h; that's probably fine.

Looks fine otherwise.

dmgreen updated this revision to Diff 194035.Apr 6 2019, 3:20 PM

Refactored

jmolloy accepted this revision.Apr 23 2019, 3:51 AM
jmolloy added a subscriber: jmolloy.

Seems reasonable to me.

This revision is now accepted and ready to land.Apr 23 2019, 3:51 AM

Thanks James!

This revision was automatically updated to reflect the committed changes.