This is an archive of the discontinued LLVM Phabricator instance.

[GlobalOpt] Fix the assert for stored once non-pointer to global address
ClosedPublic

Authored by scui on Aug 2 2021, 12:29 PM.

Details

Summary

This is to fix the assert @bjope reported due to the code change of https://reviews.llvm.org/D106589. The test case from @bjope is also included.

Diff Detail

Event Timeline

scui created this revision.Aug 2 2021, 12:29 PM
scui requested review of this revision.Aug 2 2021, 12:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2021, 12:29 PM
efriedma accepted this revision.Aug 2 2021, 1:18 PM

LGTM

This revision is now accepted and ready to land.Aug 2 2021, 1:18 PM
bjope added a comment.Aug 2 2021, 1:20 PM

I don't know much about globalopt and the actual code change. But the test case looks good, and I've verified that this fix also works for my original test case (the non-reduced C code).