File: emit-big-cst.ll

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (57 lines) | stat: -rw-r--r-- 1,390 bytes parent folder | download | duplicates (8)
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
; RUN: llc -march=mips < %s | FileCheck %s --check-prefix=BE
; RUN: llc -march=mipsel < %s | FileCheck %s --check-prefix=LE
; Check assembly printing of odd constants.

; BE-LABEL: bigCst:
; BE-NEXT: .8byte 28829195638097253
; BE-NEXT: .2byte 46
; BE-NEXT: .byte 0
; BE-NEXT: .space 5
; BE-NEXT: .size bigCst, 16

; LE-LABEL: bigCst:
; LE-NEXT: .8byte 12713950999227904
; LE-NEXT: .2byte 26220
; LE-NEXT: .byte 0
; LE-NEXT: .space 5
; LE-NEXT: .size bigCst, 16

; BE-LABEL: notSoBigCst:
; BE-NEXT:  .8byte  72057594037927935
; BE-NEXT:  .size   notSoBigCst, 8

; LE-LABEL: notSoBigCst:
; LE-NEXT:  .8byte  72057594037927935
; LE-NEXT:  .size   notSoBigCst, 8

; BE-LABEL: smallCst:
; BE-NEXT: .2byte 4386
; BE-NEXT: .byte 51
; BE-NEXT: .space 1
; BE-NEXT: .size smallCst, 4

; LE-LABEL: smallCst:
; LE-NEXT: .2byte 8755
; LE-NEXT: .byte 17
; LE-NEXT: .space 1
; LE-NEXT: .size smallCst, 4

@bigCst = internal constant i82 483673642326615442599424

define void @accessBig(ptr %storage) {
  %bigLoadedCst = load volatile i82, ptr @bigCst
  %tmp = add i82 %bigLoadedCst, 1
  store i82 %tmp, ptr %storage
  ret void
}

@notSoBigCst = internal constant i57 72057594037927935

define void @accessNotSoBig(ptr %storage) {
  %bigLoadedCst = load volatile i57, ptr @notSoBigCst
  %tmp = add i57 %bigLoadedCst, 1
  store i57 %tmp, ptr %storage
  ret void
}

@smallCst = internal constant i24 1122867