1 ; RUN: llc < %s -march=mips64el -mcpu=mips64r2 -target-abi=n64 | FileCheck %s
3 define i64 @dext(i64 %i) nounwind readnone {
6 ; CHECK: dext ${{[0-9]+}}, ${{[0-9]+}}, 5, 10
8 %and = and i64 %shr, 1023
12 define i64 @dextm(i64 %i) nounwind readnone {
15 ; CHECK: dextm ${{[0-9]+}}, ${{[0-9]+}}, 5, 34
17 %and = and i64 %shr, 17179869183
21 define i64 @dextu(i64 %i) nounwind readnone {
24 ; CHECK: dextu ${{[0-9]+}}, ${{[0-9]+}}, 34, 6
25 %shr = lshr i64 %i, 34
26 %and = and i64 %shr, 63
30 define i64 @dins(i64 %i, i64 %j) nounwind readnone {
33 ; CHECK: dins ${{[0-9]+}}, ${{[0-9]+}}, 8, 10
35 %and = and i64 %shl2, 261888
36 %and3 = and i64 %i, -261889
37 %or = or i64 %and3, %and
41 define i64 @dinsm(i64 %i, i64 %j) nounwind readnone {
44 ; CHECK: dinsm ${{[0-9]+}}, ${{[0-9]+}}, 10, 33
45 %shl4 = shl i64 %j, 10
46 %and = and i64 %shl4, 8796093021184
47 %and5 = and i64 %i, -8796093021185
48 %or = or i64 %and5, %and
52 define i64 @dinsu(i64 %i, i64 %j) nounwind readnone {
55 ; CHECK: dinsu ${{[0-9]+}}, ${{[0-9]+}}, 40, 13
56 %shl4 = shl i64 %j, 40
57 %and = and i64 %shl4, 9006099743113216
58 %and5 = and i64 %i, -9006099743113217
59 %or = or i64 %and5, %and