This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Fix insert point in localizer
ClosedPublic

Authored by arsenm on Jan 11 2022, 11:02 AM.

Details

Summary

This was inserting the new G_CONSTANT after the use, and the later
block scan would run off the end. Fix calling SkipPHIsAndLabels for no
apparent reason.

Diff Detail

Event Timeline

arsenm created this revision.Jan 11 2022, 11:02 AM
arsenm requested review of this revision.Jan 11 2022, 11:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2022, 11:02 AM
Herald added a subscriber: wdng. · View Herald Transcript
paquette added inline comments.Jan 11 2022, 11:07 AM
llvm/lib/CodeGen/GlobalISel/Localizer.cpp
176

why did this move?

arsenm added inline comments.Jan 11 2022, 11:17 AM
llvm/lib/CodeGen/GlobalISel/Localizer.cpp
176

Because if you hit the end with -debug, it would crash in the debug printing instead of hit the assert

foad added inline comments.Jan 11 2022, 11:24 AM
llvm/lib/CodeGen/GlobalISel/Localizer.cpp
175–176

Surely *II would suffice?

arsenm updated this revision to Diff 399067.Jan 11 2022, 1:39 PM

Drive by debug simplification

This revision is now accepted and ready to land.Jan 11 2022, 2:19 PM