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:
Andrew Brown
2020-05-26 13:56:52 -07:00
parent e430984ac4
commit 7d6e94b952
17 changed files with 69 additions and 69 deletions

View File

@@ -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((