authorgravatar for xtex@astrafall.orgxtex <xtex@astrafall.org> 2026-10-16 09:18:27+08:00
committergravatar for xtex@astrafall.orgxtex <xtex@astrafall.org> 2026-10-17 10:26:20+08:00
log415bc9e8fe70c488db4298d9aa47751f6659dfb2
treefd7df98da67ad77915c44d5ae0669e000388a890
parentf039581a2d9c4072db3f5d97c238a1a02d027c00
signature Signed by SSH key SHA256:IEYEjkZlkUTr5U9GiDAmZU/4eZus2t2RsxusyhQqwao

loongarch: fix post-materialization sign-extend sequence


1 files changed, 7 insertions(+), 7 deletions(-)

src/codegen/loongarch/Select.zig+7-7
......@@ -2127,13 +2127,6 @@ pub const Value = struct {
21272127 .large => value.location_payload.large.stack_slot = vi.allocStackSlot(isel),
21282128 }
21292129 }
2130 switch (value.flags.location_tag) {
2131 .extreme => unreachable,
2132 .small => {},
2133 .large => {
2134 try vi.reextendAdvanced(isel, vi.bitSize(isel), mat.extension, vi.extension(isel));
2135 },
2136 }
21372130 const vi_loc = vi.location(isel).?;
21382131 const maybe_loc_reg = vi_loc.asRegister();
21392132 if (maybe_loc_reg) |loc_reg| {
......@@ -2155,6 +2148,13 @@ pub const Value = struct {
21552148 assert(loc_live.* == .allocating);
21562149 loc_live.* = vi;
21572150 }
2151 switch (value.flags.location_tag) {
2152 .extreme => unreachable,
2153 .small => {},
2154 .large => {
2155 try vi.reextendAdvanced(isel, vi.bitSize(isel), mat.extension, vi.extension(isel));
2156 },
2157 }
21582158 },
21592159 .value => unreachable,
21602160 .address => |addr_vi| {