1 ; RUN: llc -march=mips64 -mcpu=octeon -target-abi=n64 < %s -o - | FileCheck %s
3 define i64 @cins_zext(i32 signext %n) {
6 %conv = zext i32 %shl to i64
9 ; CHECK-LABEL: cins_zext:
10 ; CHECK: cins $[[R0:[0-9]+]], $[[R1:[0-9]+]], 5, 26
14 define i64 @cins_and_shl(i64 zeroext %n) {
17 %shl = and i64 %and, 16776960
20 ; CHECK-LABEL: cins_and_shl:
21 ; CHECK: cins $[[R0:[0-9]+]], $[[R1:[0-9]+]], 8, 15
25 define i64 @cins_and_shl32(i64 zeroext %n) {
28 %shl = and i64 %and, 18014123631575040
31 ; CHECK-LABEL: cins_and_shl32:
32 ; CHECK: cins32 $[[R0:[0-9]+]], $[[R1:[0-9]+]], 6, 15
36 define zeroext i16 @cins_and_shl_16(i16 zeroext %n) {
42 ; CHECK-LABEL: cins_and_shl_16:
43 ; CHECK: cins $[[R0:[0-9]+]], $[[R1:[0-9]+]], 2, 3
47 define zeroext i8 @cins_and_shl_8(i8 zeroext %n) {
53 ; CHECK-LABEL: cins_and_shl_8:
54 ; CHECK: cins $[[R0:[0-9]+]], $[[R1:[0-9]+]], 2, 1
58 define i32 @cins_i32(i32 signext %a) {
61 %shl = and i32 %and, 536739840
64 ; CHECK-LABEL: cins_i32:
65 ; CHECK: cins $[[R0:[0-9]+]], $[[R1:[0-9]+]], 17, 11
69 define i64 @cins_shl_and(i32 signext %n) {
71 %and = and i32 %n, 65535
72 %conv = zext i32 %and to i64
73 %shl = shl nuw nsw i64 %conv, 31
76 ; CHECK-LABEL: cins_shl_and:
77 ; CHECK: cins $[[R0:[0-9]+]], $[[R1:[0-9]+]], 31, 15
82 define i64 @cins_shl_and32(i32 signext %n) {
84 %and = and i32 %n, 65535
85 %conv = zext i32 %and to i64
86 %shl = shl nuw nsw i64 %conv, 47
89 ; CHECK-LABEL: cins_shl_and32:
90 ; CHECK: cins32 $[[R0:[0-9]+]], $[[R1:[0-9]+]], 15, 15