Function not [src]
Prototype
pub fn not(self: *WipFunction, val: Value, name: []const u8) Allocator.Error!Value Parameters
self: *WipFunctionval: Valuename: []const u8 Source
pub fn not(self: *WipFunction, val: Value, name: []const u8) Allocator.Error!Value {
const ty = val.typeOfWip(self);
const all_ones = try self.builder.splatValue(
ty,
try self.builder.intConst(ty.scalarType(self.builder), -1),
);
return self.bin(.xor, val, all_ones, name);
}