This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Fix freeze instruction getting inserted before landingpad
ClosedPublic

Authored by danilaml on Aug 17 2022, 11:54 PM.

Details

Summary

The code would use first non-phi instruction as an insertion point, however
this could lead to freeze getting inserted between phi and landingpad
causing a verifier assert.

Diff Detail

Unit TestsFailed

Event Timeline

danilaml created this revision.Aug 17 2022, 11:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2022, 11:54 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
danilaml requested review of this revision.Aug 17 2022, 11:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2022, 11:54 PM
danilaml updated this revision to Diff 453630.Aug 18 2022, 5:29 AM

Simplified lit test a little

spatel accepted this revision.Aug 18 2022, 6:53 AM

LGTM

llvm/test/Transforms/InstCombine/freeze-landingpad.ll
5

typo: "propagate"

This revision is now accepted and ready to land.Aug 18 2022, 6:53 AM
This revision was landed with ongoing or failed builds.Aug 18 2022, 7:44 AM
This revision was automatically updated to reflect the committed changes.
danilaml marked an inline comment as done.Aug 18 2022, 8:08 AM