1 //===--- SPU128InstrInfo.td - Cell SPU 128-bit operations -*- tablegen -*--===//
3 // Cell SPU 128-bit operations
5 //===----------------------------------------------------------------------===//
7 // zext 32->128: Zero extend 32-bit to 128-bit
8 def : Pat<(i128 (zext R32C:$rSrc)),
9 (ROTQMBYIr128_zext_r32 R32C:$rSrc, 12)>;
11 // zext 64->128: Zero extend 64-bit to 128-bit
12 def : Pat<(i128 (zext R64C:$rSrc)),
13 (ROTQMBYIr128_zext_r64 R64C:$rSrc, 8)>;
15 // zext 16->128: Zero extend 16-bit to 128-bit
16 def : Pat<(i128 (zext R16C:$rSrc)),
17 (ROTQMBYIr128_zext_r32 (ANDi16i32 R16C:$rSrc, (ILAr32 0xffff)), 12)>;
19 // zext 8->128: Zero extend 8-bit to 128-bit
20 def : Pat<(i128 (zext R8C:$rSrc)),
21 (ROTQMBYIr128_zext_r32 (ANDIi8i32 R8C:$rSrc, 0xf), 12)>;
23 // anyext 32->128: Zero extend 32-bit to 128-bit
24 def : Pat<(i128 (anyext R32C:$rSrc)),
25 (ROTQMBYIr128_zext_r32 R32C:$rSrc, 12)>;
27 // anyext 64->128: Zero extend 64-bit to 128-bit
28 def : Pat<(i128 (anyext R64C:$rSrc)),
29 (ROTQMBYIr128_zext_r64 R64C:$rSrc, 8)>;
31 // anyext 16->128: Zero extend 16-bit to 128-bit
32 def : Pat<(i128 (anyext R16C:$rSrc)),
33 (ROTQMBYIr128_zext_r32 (ANDi16i32 R16C:$rSrc, (ILAr32 0xffff)), 12)>;
35 // anyext 8->128: Zero extend 8-bit to 128-bit
36 def : Pat<(i128 (anyext R8C:$rSrc)),
37 (ROTQMBYIr128_zext_r32 (ANDIi8i32 R8C:$rSrc, 0xf), 12)>;
40 def : Pat<(shl GPRC:$rA, R32C:$rB),
41 (SHLQBYBIr128 (SHLQBIr128 GPRC:$rA, R32C:$rB), R32C:$rB)>;