This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Fix CSEMIRBuilder silently allowing use-before-def.
ClosedPublic

Authored by aemerson on Sep 30 2020, 12:43 PM.

Details

Summary

If a CSEMIRBuilder query hits the instruction at the current insert point, move insert point ahead one so that subsequent uses of the builder don't end up with uses before defs.

This fix also shows that AMDGPU was also affected by this bug often, but got away with it because it was using a G_IMPLICIT_DEF before the use.

Diff Detail

Event Timeline

aemerson created this revision.Sep 30 2020, 12:43 PM
aemerson requested review of this revision.Sep 30 2020, 12:43 PM
This revision is now accepted and ready to land.Oct 5 2020, 10:09 AM
This revision was landed with ongoing or failed builds.Oct 5 2020, 11:00 AM
This revision was automatically updated to reflect the committed changes.