| ... | @@ -5127,7 +5127,7 @@ fn airMemset(self: *FuncGen, inst: Air.Inst.Index, safety: bool) Allocator.Error | ... | @@ -5127,7 +5127,7 @@ fn airMemset(self: *FuncGen, inst: Air.Inst.Index, safety: bool) Allocator.Error |
| 5127 | const value = try self.resolveInst(bin_op.rhs); | 5127 | const value = try self.resolveInst(bin_op.rhs); |
| 5128 | const elem_abi_size = elem_ty.abiSize(zcu); | 5128 | const elem_abi_size = elem_ty.abiSize(zcu); |
| 5129 | | 5129 | |
| 5130 | if (elem_abi_size == 1) { | 5130 | if (elem_abi_size == 1 and elem_ty.bitSize(zcu) == 8) { |
| 5131 | // In this case we can take advantage of LLVM's intrinsic. | 5131 | // In this case we can take advantage of LLVM's intrinsic. |
| 5132 | const fill_byte = try self.bitCast(value, elem_ty, Type.u8); | 5132 | const fill_byte = try self.bitCast(value, elem_ty, Type.u8); |
| 5133 | const len = try self.sliceOrArrayLenInBytes(dest_slice, ptr_ty); | 5133 | const len = try self.sliceOrArrayLenInBytes(dest_slice, ptr_ty); |