93 lines · plain
1; RUN: llc -mtriple=mips64 -mcpu=octeon -target-abi=n64 < %s -o - | FileCheck %s2 3define i64 @cins_zext(i32 signext %n) {4entry:5 %shl = shl i32 %n, 56 %conv = zext i32 %shl to i647 ret i64 %conv8 9; CHECK-LABEL: cins_zext:10; CHECK: cins $[[R0:[0-9]+]], $[[R1:[0-9]+]], 5, 2611 12}13 14define i64 @cins_and_shl(i64 zeroext %n) {15entry:16 %and = shl i64 %n, 817 %shl = and i64 %and, 1677696018 ret i64 %shl19 20; CHECK-LABEL: cins_and_shl:21; CHECK: cins $[[R0:[0-9]+]], $[[R1:[0-9]+]], 8, 1522 23}24 25define i64 @cins_and_shl32(i64 zeroext %n) {26entry:27 %and = shl i64 %n, 3828 %shl = and i64 %and, 1801412363157504029 ret i64 %shl30 31; CHECK-LABEL: cins_and_shl32:32; CHECK: cins32 $[[R0:[0-9]+]], $[[R1:[0-9]+]], 6, 1533 34}35 36define zeroext i16 @cins_and_shl_16(i16 zeroext %n) {37entry:38 %0 = shl i16 %n, 239 %1 = and i16 %0, 6040 ret i16 %141 42; CHECK-LABEL: cins_and_shl_16:43; CHECK: cins $[[R0:[0-9]+]], $[[R1:[0-9]+]], 2, 344 45}46 47define zeroext i8 @cins_and_shl_8(i8 zeroext %n) {48entry:49 %0 = shl i8 %n, 250 %1 = and i8 %0, 1251 ret i8 %152 53; CHECK-LABEL: cins_and_shl_8:54; CHECK: cins $[[R0:[0-9]+]], $[[R1:[0-9]+]], 2, 155 56}57 58define i32 @cins_i32(i32 signext %a) {59entry:60 %and = shl i32 %a, 1761 %shl = and i32 %and, 53673984062 ret i32 %shl63 64; CHECK-LABEL: cins_i32:65; CHECK: cins $[[R0:[0-9]+]], $[[R1:[0-9]+]], 17, 1166 67}68 69define i64 @cins_shl_and(i32 signext %n) {70entry:71 %and = and i32 %n, 6553572 %conv = zext i32 %and to i6473 %shl = shl nuw nsw i64 %conv, 3174 ret i64 %shl75 76; CHECK-LABEL: cins_shl_and:77; CHECK: cins $[[R0:[0-9]+]], $[[R1:[0-9]+]], 31, 1578 79}80 81 82define i64 @cins_shl_and32(i32 signext %n) {83entry:84 %and = and i32 %n, 6553585 %conv = zext i32 %and to i6486 %shl = shl nuw nsw i64 %conv, 4787 ret i64 %shl88 89; CHECK-LABEL: cins_shl_and32:90; CHECK: cins32 $[[R0:[0-9]+]], $[[R1:[0-9]+]], 15, 1591 92}93