Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix codegen for getfield of homogeneous tuples #34243

Merged
merged 1 commit into from
Jan 3, 2020
Merged

Conversation

JeffBezanson
Copy link
Member

This is an alternative to #34208. Uses the same method as the typed_load call for arrayref.

fix #34206, fix #34207

@JeffBezanson JeffBezanson added compiler:codegen Generation of LLVM IR and native code bugfix This change fixes an existing bug backport 1.4 labels Jan 2, 2020
Value *ptr = maybe_decay_tracked(data_pointer(ctx, obj));
*ret = typed_load(ctx, ptr, vidx, jt, obj.tbaa, nullptr, false);
*ret = typed_load(ctx, ptr, vidx,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return cgval gets annotated with the type we pass in. Does widening to Any pessimize later codegen?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd guess not really, since codegen generally uses inferred types when it needs type info. We're also doing the same thing for arrayref on pointer arrays, so it'd better work 😛

@JeffBezanson JeffBezanson merged commit 007cb29 into master Jan 3, 2020
@JeffBezanson JeffBezanson deleted the jb/fix34206 branch January 3, 2020 19:01
KristofferC pushed a commit that referenced this pull request Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug compiler:codegen Generation of LLVM IR and native code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unreachable reached Malformed view created by ntuple on master
4 participants