diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-03-31 16:23:01 -0400 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2023-04-02 18:05:44 +0300 |
| commit | f4b411314ccf8e852d3febddc8b31ce1f533938b (patch) | |
| tree | 41ff16cd4d9bec89e5f57be34e790017be93a4d0 /src/codegen/llvm.zig | |
| parent | 878163e58813aef968900aa7495dacc5220eb941 (diff) | |
| download | zig-f4b411314ccf8e852d3febddc8b31ce1f533938b.tar.gz zig-f4b411314ccf8e852d3febddc8b31ce1f533938b.zip | |
Sema: defer stores to inferred allocs
This lets us generate the store with knowledge of the type to be stored.
Therefore, we can avoid generating garbage Air with stores through
pointers to comptime-only types which backends cannot lower.
Closes #13410
Closes #15122
Diffstat (limited to 'src/codegen/llvm.zig')
| -rw-r--r-- | src/codegen/llvm.zig | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index ce49fcde78..f32047fe64 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -8216,7 +8216,6 @@ pub const FuncGen = struct { const dest_ptr = try self.resolveInst(bin_op.lhs); const ptr_ty = self.air.typeOf(bin_op.lhs); const operand_ty = ptr_ty.childType(); - if (!operand_ty.isFnOrHasRuntimeBitsIgnoreComptime()) return null; // TODO Sema should emit a different instruction when the store should // possibly do the safety 0xaa bytes for undefined. |
