x86_64: rewrite vector @truncate

This commit is contained in:
Jacob Young 2025-02-03 01:10:34 -05:00
parent c58e60a042
commit 39119088f9
3 changed files with 6457 additions and 192 deletions

View File

@ -23751,7 +23751,8 @@ fn zirTruncate(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
@tagName(dest_info.signedness), operand_ty.fmt(pt),
});
}
if (operand_info.bits < dest_info.bits) {
switch (std.math.order(dest_info.bits, operand_info.bits)) {
.gt => {
const msg = msg: {
const msg = try sema.errMsg(
src,
@ -23768,6 +23769,9 @@ fn zirTruncate(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
break :msg msg;
};
return sema.failWithOwnedErrorMsg(block, msg);
},
.eq => return operand,
.lt => {},
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff