| ... | ... | @@ -13489,23 +13489,7 @@ fn zirByteSwap(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 13489 | 13489 | const operand_src: LazySrcLoc = .{ .node_offset_builtin_call_arg1 = inst_data.src_node }; |
| 13490 | 13490 | const operand = sema.resolveInst(inst_data.operand); |
| 13491 | 13491 | const operand_ty = sema.typeOf(operand); |
| 13492 | | |
| 13493 | | const scalar_ty = if (operand_ty.zigTypeTag() == .Vector) |
| 13494 | | operand_ty.elemType2() |
| 13495 | | else |
| 13496 | | operand_ty; |
| 13497 | | |
| 13498 | | switch (operand_ty.zigTypeTag()) { |
| 13499 | | .Int, .ComptimeInt => {}, |
| 13500 | | .Vector => { |
| 13501 | | switch (scalar_ty.zigTypeTag()) { |
| 13502 | | .Int, .ComptimeInt => {}, |
| 13503 | | else => return sema.fail(block, ty_src, "expected vector of integer type, found vector of '{}'", .{scalar_ty}), |
| 13504 | | } |
| 13505 | | }, |
| 13506 | | else => return sema.fail(block, ty_src, "expected integer type or vector of integer type, found '{}'", .{operand_ty}), |
| 13507 | | } |
| 13508 | | |
| 13492 | const scalar_ty = try sema.checkIntOrVectorAllowComptime(block, operand, operand_src); |
| 13509 | 13493 | const target = sema.mod.getTarget(); |
| 13510 | 13494 | const bits = scalar_ty.intInfo(target).bits; |
| 13511 | 13495 | if (bits % 8 != 0) { |