diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2025-05-30 12:13:18 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2025-05-31 18:54:28 -0400 |
| commit | 6198f7afb76b7a5a6d359bfd24f8fbdabc77939b (patch) | |
| tree | 8acd0c84bde1d8e05e87a89b222a2d3c6ced2781 /src/codegen/c.zig | |
| parent | b4a0a082dca22b47fe394908c44eec7102def417 (diff) | |
| download | zig-6198f7afb76b7a5a6d359bfd24f8fbdabc77939b.tar.gz zig-6198f7afb76b7a5a6d359bfd24f8fbdabc77939b.zip | |
Sema: remove `all_vector_instructions` logic
Backends can instead ask legalization on a per-instruction basis.
Diffstat (limited to 'src/codegen/c.zig')
| -rw-r--r-- | src/codegen/c.zig | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig index d83eb8f771..2d3b236a86 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -20,6 +20,10 @@ const Alignment = InternPool.Alignment; const BigIntLimb = std.math.big.Limb; const BigInt = std.math.big.int; +pub inline fn legalizeFeatures(_: *const std.Target) *const Air.Legalize.Features { + return comptime &.initEmpty(); +} + pub const CType = @import("c/Type.zig"); pub const CValue = union(enum) { @@ -4179,7 +4183,7 @@ fn airOverflow(f: *Function, inst: Air.Inst.Index, operation: []const u8, info: try v.elem(f, w); try w.writeAll(", "); try f.writeCValue(w, rhs, .FunctionArgument); - try v.elem(f, w); + if (f.typeOf(bin_op.rhs).isVector(zcu)) try v.elem(f, w); try f.object.dg.renderBuiltinInfo(w, scalar_ty, info); try w.writeAll(");\n"); try v.end(f, inst, w); @@ -6536,7 +6540,7 @@ fn airBinBuiltinCall( try v.elem(f, writer); try writer.writeAll(", "); try f.writeCValue(writer, rhs, .FunctionArgument); - try v.elem(f, writer); + if (f.typeOf(bin_op.rhs).isVector(zcu)) try v.elem(f, writer); try f.object.dg.renderBuiltinInfo(writer, scalar_ty, info); try writer.writeAll(");\n"); try v.end(f, inst, writer); |
