From d997433fd6f80897874ac3978c22cbd60b9f44b6 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 (cherry picked from commit cb47b01d3eff8da054384bc0c293db8f9f8b2783) --- src/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 53a278d42d102..f1e89e760aa1c 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -5031,7 +5031,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.at(idx) = val;