From e60a6f2ad2fca85afbd71840c8668919c330aed1 Mon Sep 17 00:00:00 2001 From: Johnnie Birch <45402135+jlb6740@users.noreply.github.com> Date: Wed, 5 Aug 2020 13:56:20 -0700 Subject: [PATCH] Fixup packed integer add lowering Remove stray print statement Fix bug in match statement causing unreachable code. --- cranelift/codegen/src/isa/x64/lower.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs index 0fb250f9f8..407a9a687e 100644 --- a/cranelift/codegen/src/isa/x64/lower.rs +++ b/cranelift/codegen/src/isa/x64/lower.rs @@ -341,14 +341,13 @@ fn lower_insn_to_regs>( // 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"),