File: mips64extins.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (61 lines) | stat: -rw-r--r-- 1,469 bytes parent folder | download | duplicates (23)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
; RUN: llc < %s -march=mips64el -mcpu=mips64r2 -target-abi=n64 | FileCheck %s

define i64 @dext(i64 %i) nounwind readnone {
entry:
; CHECK-LABEL: dext:
; CHECK: dext ${{[0-9]+}}, ${{[0-9]+}}, 5, 10
  %shr = lshr i64 %i, 5
  %and = and i64 %shr, 1023
  ret i64 %and
}

define i64 @dextm(i64 %i) nounwind readnone {
entry:
; CHECK-LABEL: dextm:
; CHECK: dextm ${{[0-9]+}}, ${{[0-9]+}}, 5, 34
  %shr = lshr i64 %i, 5
  %and = and i64 %shr, 17179869183
  ret i64 %and
}

define i64 @dextu(i64 %i) nounwind readnone {
entry:
; CHECK-LABEL: dextu:
; CHECK: dextu ${{[0-9]+}}, ${{[0-9]+}}, 34, 6
  %shr = lshr i64 %i, 34
  %and = and i64 %shr, 63
  ret i64 %and
}

define i64 @dins(i64 %i, i64 %j) nounwind readnone {
entry:
; CHECK-LABEL: dins:
; CHECK: dins ${{[0-9]+}}, ${{[0-9]+}}, 8, 10
  %shl2 = shl i64 %j, 8
  %and = and i64 %shl2, 261888
  %and3 = and i64 %i, -261889
  %or = or i64 %and3, %and
  ret i64 %or
}

define i64 @dinsm(i64 %i, i64 %j) nounwind readnone {
entry:
; CHECK-LABEL: dinsm:
; CHECK: dinsm ${{[0-9]+}}, ${{[0-9]+}}, 10, 33
  %shl4 = shl i64 %j, 10
  %and = and i64 %shl4, 8796093021184
  %and5 = and i64 %i, -8796093021185
  %or = or i64 %and5, %and
  ret i64 %or
}

define i64 @dinsu(i64 %i, i64 %j) nounwind readnone {
entry:
; CHECK-LABEL: dinsu:
; CHECK: dinsu ${{[0-9]+}}, ${{[0-9]+}}, 40, 13
  %shl4 = shl i64 %j, 40
  %and = and i64 %shl4, 9006099743113216
  %and5 = and i64 %i, -9006099743113217
  %or = or i64 %and5, %and
  ret i64 %or
}