Skip to content

Commit

Permalink
Fixup packed integer add lowering
Browse files Browse the repository at this point in the history
Remove stray print statement
Fix bug in match statement causing unreachable code.
  • Loading branch information
jlb6740 committed Aug 7, 2020
1 parent f5909b3 commit e60a6f2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cranelift/codegen/src/isa/x64/lower.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,13 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
// TODO For commutative operations (add, mul, and, or, xor), try to commute the
// operands if one is an immediate.
let ty = ty.unwrap();
println!("Type: {}, Ops: {}", ty, op);
if ty.lane_count() > 1 {
let sse_op = match op {
Opcode::Iadd => match ty {
I8x16 => SseOpcode::Paddb,
I16x8 => SseOpcode::Paddw,
I32x4 => SseOpcode::Paddd,
I64x2 => SseOpcode::Paddq,
types::I8X16 => SseOpcode::Paddb,
types::I16X8 => SseOpcode::Paddw,
types::I32X4 => SseOpcode::Paddd,
types::I64X2 => SseOpcode::Paddq,
_ => panic!("Unsupported type for packed Iadd instruction"),
},
_ => panic!("Unsupported packed instruction"),
Expand Down

0 comments on commit e60a6f2

Please sign in to comment.