1 ; RUN: llc < %s -march=mips64el -mcpu=mips64r2 -target-abi=n64 | FileCheck %s
3 define i64 @dext(i64 %i) nounwind readnone {
5 ; CHECK: dext ${{[0-9]+}}, ${{[0-9]+}}, 5, 10
7 %and = and i64 %shr, 1023
11 define i64 @dextm(i64 %i) nounwind readnone {
13 ; CHECK: dext ${{[0-9]+}}, ${{[0-9]+}}, 5, 34
15 %and = and i64 %shr, 17179869183
19 define i64 @dextu(i64 %i) nounwind readnone {
21 ; CHECK: dext ${{[0-9]+}}, ${{[0-9]+}}, 34, 6
22 %shr = lshr i64 %i, 34
23 %and = and i64 %shr, 63
27 define i64 @dins(i64 %i, i64 %j) nounwind readnone {
29 ; CHECK: dins ${{[0-9]+}}, ${{[0-9]+}}, 8, 10
31 %and = and i64 %shl2, 261888
32 %and3 = and i64 %i, -261889
33 %or = or i64 %and3, %and
37 define i64 @dinsm(i64 %i, i64 %j) nounwind readnone {
39 ; CHECK: dins ${{[0-9]+}}, ${{[0-9]+}}, 10, 33
40 %shl4 = shl i64 %j, 10
41 %and = and i64 %shl4, 8796093021184
42 %and5 = and i64 %i, -8796093021185
43 %or = or i64 %and5, %and
47 define i64 @dinsu(i64 %i, i64 %j) nounwind readnone {
49 ; CHECK: dins ${{[0-9]+}}, ${{[0-9]+}}, 40, 13
50 %shl4 = shl i64 %j, 40
51 %and = and i64 %shl4, 9006099743113216
52 %and5 = and i64 %i, -9006099743113217
53 %or = or i64 %and5, %and