This is an archive of the discontinued LLVM Phabricator instance.

CoroFrame: Fix missing bitcast for some frame merges
ClosedPublic

Authored by MatzeB on Jan 23 2023, 10:25 AM.

Details

Summary

The code to adjust types when merging fields on the coroutine frame accidentally used GetElementPtrInst::getResultElementType() which does the return the type the resulting pointer points to (so misses a pointer type). This worked most of the time by accident because the type nearly never matched, but failed to add a necessary bitcast for from i8** to i8*.

Diff Detail

Event Timeline

MatzeB created this revision.Jan 23 2023, 10:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 23 2023, 10:25 AM
MatzeB requested review of this revision.Jan 23 2023, 10:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 23 2023, 10:25 AM
nikic requested changes to this revision.Jan 23 2023, 10:30 AM
nikic added a subscriber: nikic.

Please remove the test case, we do not accept new typed pointer test coverage.

This revision now requires changes to proceed.Jan 23 2023, 10:30 AM

Please remove the test case, we do not accept new typed pointer test coverage.

The issue does not exist for opaque pointers so I cannot convert the test.

Will remove the test then...

MatzeB updated this revision to Diff 491450.Jan 23 2023, 10:44 AM

drop test

nikic accepted this revision.Jan 23 2023, 12:02 PM

LGTM, as long as it lands before the creation of the release/16.x branch.

This revision is now accepted and ready to land.Jan 23 2023, 12:02 PM
This revision was automatically updated to reflect the committed changes.