This is an archive of the discontinued LLVM Phabricator instance.

[ARM][ConstantIslands] Correct block size update
ClosedPublic

Authored by samparker on Nov 21 2019, 5:23 AM.

Details

Summary

When inserting a non-decrementing LE, the basic block was being resized to take into consideration that a tCMP and tBcc had been combined into one T1 instruction. This is not true in the LE case where we generate a CBN?Z and an LE.

Diff Detail

Event Timeline

samparker created this revision.Nov 21 2019, 5:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 21 2019, 5:23 AM
dmgreen added inline comments.Nov 21 2019, 5:45 AM
llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
1987

We can drop the LastMI != Br.MI? And does this comment need an update?

llvm/test/CodeGen/Thumb2/LowOverheadLoops/out-of-range-cbz.mir
131

You can clean this up.

samparker marked an inline comment as done.Nov 21 2019, 5:56 AM
samparker added inline comments.
llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
1987

The comment is still valid but maybe we can remove the check... I'll see if this muddled web of logic survives that change.

samparker updated this revision to Diff 230451.Nov 21 2019, 6:30 AM
  • Cleaned up the test.
  • Rewrote the check and comment about removing a branch.
dmgreen accepted this revision.Nov 21 2019, 6:47 AM

Thanks. LGTM

This revision is now accepted and ready to land.Nov 21 2019, 6:47 AM
This revision was automatically updated to reflect the committed changes.