diff --git a/lib/llvm-backend/src/code.rs b/lib/llvm-backend/src/code.rs index 14982546d..12ba0fbff 100644 --- a/lib/llvm-backend/src/code.rs +++ b/lib/llvm-backend/src/code.rs @@ -1019,7 +1019,14 @@ impl<'ctx> FunctionCodeGenerator for LLVMFunctionCodeGenerator<'ct for local_idx in 0..count { let alloca = alloca_builder.build_alloca(ty, &format!("local{}", param_len + local_idx)); - builder.build_store(alloca, default_value); + let store = builder.build_store(alloca, default_value); + tbaa_label( + &self.module, + &intrinsics, + "local", + store, + Some((param_len + local_idx) as u32), + ); if local_idx == 0 { alloca_builder.position_before( &alloca @@ -8775,10 +8782,17 @@ impl<'ctx> ModuleCodeGenerator, LLVMBackend, Cod let real_ty_llvm = type_to_llvm(&intrinsics, real_ty); let alloca = alloca_builder.build_alloca(real_ty_llvm, &format!("local{}", index)); - builder.build_store( + let store = builder.build_store( alloca, builder.build_bitcast(param, real_ty_llvm, &state.var_name()), ); + tbaa_label( + &self.module, + &intrinsics, + "local", + store, + Some(index as u32), + ); if index == 0 { alloca_builder.position_before( &alloca