From cb47b01d3eff8da054384bc0c293db8f9f8b2783 Mon Sep 17 00:00:00 2001 From: Gabriel Baraldi Date: Thu, 14 Mar 2024 10:51:10 -0400 Subject: [PATCH] codegen: change tbaa of ptr_phi to tbaa_value (#53655) Fixes https://github.com/JuliaLang/julia/issues/53612 --- src/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index eaa9335659fb1..d4ce52b4dc1d0 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -5634,7 +5634,7 @@ static void emit_phinode_assign(jl_codectx_t &ctx, ssize_t idx, jl_value_t *r) Value *ptr = ctx.builder.CreateSelect(isboxed, maybe_bitcast(ctx, decay_derived(ctx, ptr_phi), getInt8PtrTy(ctx.builder.getContext())), maybe_bitcast(ctx, decay_derived(ctx, phi), getInt8PtrTy(ctx.builder.getContext()))); - jl_cgval_t val = mark_julia_slot(ptr, phiType, Tindex_phi, ctx.tbaa().tbaa_stack); // XXX: this TBAA is wrong for ptr_phi + jl_cgval_t val = mark_julia_slot(ptr, phiType, Tindex_phi, best_tbaa(ctx.tbaa(), phiType)); val.Vboxed = ptr_phi; ctx.PhiNodes.push_back(std::make_tuple(val, BB, dest, ptr_phi, r)); ctx.SAvalues[idx] = val;