Function shuffleVector [src]

Prototype

pub fn shuffleVector( self: *WipFunction, lhs: Value, rhs: Value, mask: Value, name: []const u8, ) Allocator.Error!Value

Parameters

self: *WipFunctionlhs: Valuerhs: Valuemask: Valuename: []const u8

Source

pub fn shuffleVector( self: *WipFunction, lhs: Value, rhs: Value, mask: Value, name: []const u8, ) Allocator.Error!Value { assert(lhs.typeOfWip(self).isVector(self.builder)); assert(lhs.typeOfWip(self) == rhs.typeOfWip(self)); assert(mask.typeOfWip(self).scalarType(self.builder).isInteger(self.builder)); _ = try self.ensureUnusedExtraCapacity(1, Instruction.ShuffleVector, 0); const instruction = try self.addInst(name, .{ .tag = .shufflevector, .data = self.addExtraAssumeCapacity(Instruction.ShuffleVector{ .lhs = lhs, .rhs = rhs, .mask = mask, }), }); return instruction.toValue(); }