diff options
| author | Matthew Lugg <mlugg@mlugg.co.uk> | 2025-11-12 23:14:02 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-12 23:14:02 +0000 |
| commit | 181b25ce4fcebc32f6fdc7498148c0f5e131dda9 (patch) | |
| tree | f5cfe981b1b158e8bac17cc3a3bc909ffb7b1aa1 /src/codegen/aarch64 | |
| parent | dfd7b7f2337d84ce660253a37079489f7780b055 (diff) | |
| parent | 532aa3c5758f110eb7cf0992eb394088ab563899 (diff) | |
| download | zig-181b25ce4fcebc32f6fdc7498148c0f5e131dda9.tar.gz zig-181b25ce4fcebc32f6fdc7498148c0f5e131dda9.zip | |
Merge pull request #25772 from mlugg/kill-dead-code
compiler: rewrite some legalizations, and remove a bunch of dead code
Diffstat (limited to 'src/codegen/aarch64')
| -rw-r--r-- | src/codegen/aarch64/Select.zig | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/codegen/aarch64/Select.zig b/src/codegen/aarch64/Select.zig index 4fe798271f..64aeeb7ff4 100644 --- a/src/codegen/aarch64/Select.zig +++ b/src/codegen/aarch64/Select.zig @@ -134,6 +134,10 @@ pub fn analyze(isel: *Select, air_body: []const Air.Inst.Index) !void { var air_inst_index = air_body[air_body_index]; const initial_def_order_len = isel.def_order.count(); air_tag: switch (air_tags[@intFromEnum(air_inst_index)]) { + // No "scalarize" legalizations are enabled, so these instructions never appear. + .legalize_vec_elem_val => unreachable, + .legalize_vec_store_elem => unreachable, + .arg, .ret_addr, .frame_addr, @@ -830,18 +834,6 @@ pub fn analyze(isel: *Select, air_body: []const Air.Inst.Index) !void { air_inst_index = air_body[air_body_index]; continue :air_tag air_tags[@intFromEnum(air_inst_index)]; }, - .vector_store_elem => { - const vector_store_elem = air_data[@intFromEnum(air_inst_index)].vector_store_elem; - const bin_op = isel.air.extraData(Air.Bin, vector_store_elem.payload).data; - - try isel.analyzeUse(vector_store_elem.vector_ptr); - try isel.analyzeUse(bin_op.lhs); - try isel.analyzeUse(bin_op.rhs); - - air_body_index += 1; - air_inst_index = air_body[air_body_index]; - continue :air_tag air_tags[@intFromEnum(air_inst_index)]; - }, } assert(air_body_index == air_body.len); isel.def_order.shrinkRetainingCapacity(initial_def_order_len); @@ -962,6 +954,11 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory, }; air_tag: switch (air.next().?) { else => |air_tag| return isel.fail("unimplemented {t}", .{air_tag}), + + // No "scalarize" legalizations are enabled, so these instructions never appear. + .legalize_vec_elem_val => unreachable, + .legalize_vec_store_elem => unreachable, + .arg => { const arg_vi = isel.live_values.fetchRemove(air.inst_index).?.value; defer arg_vi.deref(isel); |
