For simple derived type ConstantEmitter returns a struct of the same
size but different type which is then stored field-by-field into memory
via pointer to derived type. In case base type has more fields than derived,
the incorrect GEP is emitted. So, just cast pointer to derived type to
appropriate type with enough fields.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Unit tests fail seems unrelated. I'm seeing the same test fail for a commit that is already in main https://github.com/llvm/llvm-project/commit/f1f583347d00aad378eb0128e72d3d2e8be5174b .
I think having a link to the github issue in the summary allows for the issue be closed automatically when you commit. Is this correct @aaron.ballman I have been doing this for a while and they get closed when I commit but maybe there is another mechanism involved.
This works at least for GitHub pull requests, see https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue . We've been using this in a downstream project. I was hoping it works in the same way for commits, so added issue ID to a commit message.
Yes, this works the same way for commits here. I learned recently that folks appreciate a full link to the issue (Fixes https://github.com/llvm/llvm-project/issues/NNNN) instead of Fixes #NNNN because it makes it easier to traverse from the commit message to the github issue (and it will still automatically close the issue on commit), so you might consider changing that when you land the patch.
The changes look correct to me, but codegen is not my area of expertise, so adding some other codegen reviewers to double-check.
I discovered that this patch also helps to fix crash reported in https://github.com/llvm/llvm-project/issues/59223 .
nitpick: I have been using GH as a prefix for Github issues.