Skip to content

Commit

Permalink
fix fail test
Browse files Browse the repository at this point in the history
  • Loading branch information
carnaval committed May 20, 2016
1 parent 64e38b9 commit b0d9687
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/intrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,14 @@ static Value *emit_unbox(Type *to, const jl_cgval_t &x, jl_value_t *jt, Value *d
if (dest) {
// callers using the dest argument only use it for a stack slot for now
alignment = 0;
builder.CreateMemCpy(dest, p, jl_datatype_size(jt), alignment, volatile_store, x.tbaa);
MDNode *tbaa = x.tbaa;
// the memcpy intrinsic does not allow to specify different alias tags
// for the load part (x.tbaa) and the store part (tbaa_stack).
// since the tbaa lattice has to be a tree we have unfortunately
// x.tbaa ∪ tbaa_stack = tbaa_root if x.tbaa != tbaa_stack
if (tbaa != tbaa_stack)
tbaa = NULL;
builder.CreateMemCpy(dest, p, jl_datatype_size(jt), alignment, volatile_store, tbaa);
return NULL;
}
else {
Expand Down

1 comment on commit b0d9687

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure whether this is ready to merge yet, but please squash when you do

Please sign in to comment.