diff --git a/src/codegen/loongarch/Select.zig b/src/codegen/loongarch/Select.zig index 2b86fb195ffeb8ee280fcf3735a9b824bb0f8519..6320fef5f2de0e068205e555a5225c7ed45b2920 100644 --- a/src/codegen/loongarch/Select.zig +++ b/src/codegen/loongarch/Select.zig @@ -2127,13 +2127,6 @@ pub const Value = struct { .large => value.location_payload.large.stack_slot = vi.allocStackSlot(isel), } } - switch (value.flags.location_tag) { - .extreme => unreachable, - .small => {}, - .large => { - try vi.reextendAdvanced(isel, vi.bitSize(isel), mat.extension, vi.extension(isel)); - }, - } const vi_loc = vi.location(isel).?; const maybe_loc_reg = vi_loc.asRegister(); if (maybe_loc_reg) |loc_reg| { @@ -2155,6 +2148,13 @@ pub const Value = struct { assert(loc_live.* == .allocating); loc_live.* = vi; } + switch (value.flags.location_tag) { + .extreme => unreachable, + .small => {}, + .large => { + try vi.reextendAdvanced(isel, vi.bitSize(isel), mat.extension, vi.extension(isel)); + }, + } }, .value => unreachable, .address => |addr_vi| {