Replace InsertLane format with TernaryImm8
The InsertLane format has an ordering (`value().imm().value()`) and immediate name (`"lane"`) that make it awkward to use for other instructions. This changes the ordering (`value().value().imm()`) and uses the default name (`"imm"`) throughout the codebase.
This commit is contained in:
@@ -758,7 +758,7 @@ impl<'a> Verifier<'a> {
|
||||
| Binary { .. }
|
||||
| BinaryImm { .. }
|
||||
| Ternary { .. }
|
||||
| InsertLane { .. }
|
||||
| TernaryImm8 { .. }
|
||||
| ExtractLane { .. }
|
||||
| Shuffle { .. }
|
||||
| IntCompare { .. }
|
||||
@@ -1918,14 +1918,14 @@ impl<'a> Verifier<'a> {
|
||||
arg,
|
||||
..
|
||||
}
|
||||
| ir::InstructionData::InsertLane {
|
||||
| ir::InstructionData::TernaryImm8 {
|
||||
opcode: ir::instructions::Opcode::Insertlane,
|
||||
lane,
|
||||
imm: lane,
|
||||
args: [arg, _],
|
||||
..
|
||||
} => {
|
||||
// We must be specific about the opcodes above because other instructions are using
|
||||
// the ExtractLane/InsertLane formats.
|
||||
// the same formats.
|
||||
let ty = self.func.dfg.value_type(arg);
|
||||
if u16::from(lane) >= ty.lane_count() {
|
||||
errors.fatal((
|
||||
|
||||
Reference in New Issue
Block a user