This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP]Fix PR49636: Assertion `(!Entry.getAddress() || Entry.getAddress() == Addr) && "Resetting with the new address."' failed.
ClosedPublic

Authored by ABataev on Mar 24 2021, 1:41 PM.

Details

Summary

The original issue is caused by the fact that the variable is allocated
with incorrect type i1 instead of i8. This causes the bitcasting of the
declaration to i8 type and the bitcast expression does not match the
original variable.
To fix the problem, the UndefValue initializer and the original
variable should be emitted with type i8, not i1.

Diff Detail

Event Timeline

ABataev created this revision.Mar 24 2021, 1:41 PM
ABataev requested review of this revision.Mar 24 2021, 1:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2021, 1:41 PM
jdoerfert accepted this revision.Mar 26 2021, 8:10 PM
jdoerfert added a subscriber: tra.

LGTM, @tra might have input on the cuda change but it seems reasonable and we can do that post commit.

This revision is now accepted and ready to land.Mar 26 2021, 8:10 PM
This revision was landed with ongoing or failed builds.Mar 29 2021, 6:59 AM
This revision was automatically updated to reflect the committed changes.
tra added a comment.Mar 29 2021, 9:20 AM

LGTM for CUDA.