mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
x86_64: rewrite vector @truncate
This commit is contained in:
parent
c58e60a042
commit
39119088f9
@ -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
Loading…
x
Reference in New Issue
Block a user