Merge pull request #3497 from bjorn3/misc_meta_simplifications
Misc meta crate cleanups
This commit is contained in:
@@ -319,7 +319,7 @@ impl InstructionData {
|
||||
// included in the `InstructionData` for memory-size reasons. This case, returning
|
||||
// `None`, is left here to alert users of this method that they should retrieve the
|
||||
// value using the `DataFlowGraph`.
|
||||
&InstructionData::Shuffle { mask: _, .. } => None,
|
||||
&InstructionData::Shuffle { imm: _, .. } => None,
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1264,8 +1264,8 @@ impl<'func, I: VCodeInst> LowerCtx for Lower<'func, I> {
|
||||
fn get_immediate(&self, ir_inst: Inst) -> Option<DataValue> {
|
||||
let inst_data = self.data(ir_inst);
|
||||
match inst_data {
|
||||
InstructionData::Shuffle { mask, .. } => {
|
||||
let buffer = self.f.dfg.immediates.get(mask.clone()).unwrap().as_slice();
|
||||
InstructionData::Shuffle { imm, .. } => {
|
||||
let buffer = self.f.dfg.immediates.get(imm.clone()).unwrap().as_slice();
|
||||
let value = DataValue::V128(buffer.try_into().expect("a 16-byte data buffer"));
|
||||
Some(value)
|
||||
}
|
||||
|
||||
@@ -395,8 +395,8 @@ pub fn write_operands(w: &mut dyn Write, dfg: &DataFlowGraph, inst: Inst) -> fmt
|
||||
}
|
||||
NullAry { .. } => write!(w, " "),
|
||||
TernaryImm8 { imm, args, .. } => write!(w, " {}, {}, {}", args[0], args[1], imm),
|
||||
Shuffle { mask, args, .. } => {
|
||||
let data = dfg.immediates.get(mask).expect(
|
||||
Shuffle { imm, args, .. } => {
|
||||
let data = dfg.immediates.get(imm).expect(
|
||||
"Expected the shuffle mask to already be inserted into the immediates table",
|
||||
);
|
||||
write!(w, " {}, {}, {}", args[0], args[1], data)
|
||||
|
||||
Reference in New Issue
Block a user