Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

Don't extract code containing an indirect jump from a callbr

Authored by void on Dec 2 2019, 3:14 PM.



The callbr instruction's indirect destinations are expected to be within
the current function. Extracting them will cause chaos as the callbr
will then want to branch to a label in another function, which isn't

Event Timeline

void created this revision.Dec 2 2019, 3:14 PM
vsk added a comment.Dec 2 2019, 3:19 PM

Could you add a test?


nit: const BasicBlock &PredBB : predecessors(BB)?

void updated this revision to Diff 231788.Dec 2 2019, 3:20 PM

Use range-based for loop.

void added a comment.Dec 2 2019, 3:21 PM
In D70929#1766125, @vsk wrote:

Could you add a test?

Strange. There was a test, but somehow it wasn't included. I'll re-add it.

void abandoned this revision.Apr 6 2023, 2:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2023, 2:31 PM
Herald added a subscriber: ormris. · View Herald Transcript