File: large-constants-x32.ll

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.4-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,236,516 kB
  • sloc: cpp: 7,619,569; ansic: 1,433,956; asm: 1,058,748; python: 252,181; f90: 94,671; objc: 70,753; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,585; awk: 3,523; javascript: 2,272; xml: 892; fortran: 770
file content (55 lines) | stat: -rw-r--r-- 2,087 bytes parent folder | download | duplicates (18)
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
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-linux-gnux32 | FileCheck %s

define void @constant_expressions() {
; CHECK-LABEL: constant_expressions:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    movl $-289477652, %eax # imm = 0xEEBEEBEC
; CHECK-NEXT:    movl (%eax), %ecx
; CHECK-NEXT:    movl $-289477644, %edx # imm = 0xEEBEEBF4
; CHECK-NEXT:    movl (%edx), %edx
; CHECK-NEXT:    movl $-289477648, %esi # imm = 0xEEBEEBF0
; CHECK-NEXT:    addl (%esi), %ecx
; CHECK-NEXT:    movl $-289477636, %esi # imm = 0xEEBEEBFC
; CHECK-NEXT:    addl (%esi), %edx
; CHECK-NEXT:    addl %ecx, %edx
; CHECK-NEXT:    movl %edx, (%eax)
; CHECK-NEXT:    retq
entry:
  %0 = load i32, ptr inttoptr (i32 add (i32 -289477652, i32 0) to ptr)
  %1 = load i32, ptr inttoptr (i32 add (i32 -289477652, i32 4) to ptr)
  %2 = load i32, ptr inttoptr (i32 add (i32 -289477652, i32 8) to ptr)
  %3 = load i32, ptr inttoptr (i32 add (i32 -289477652, i32 16) to ptr)
  %4 = add i32 %0, %1
  %5 = add i32 %2, %3
  %6 = add i32 %4, %5
  store i32 %6, ptr inttoptr (i32 add (i32 -289477652, i32 0) to ptr)
  ret void
}


define void @constant_expressions2() {
; CHECK-LABEL: constant_expressions2:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    movl $-289477652, %eax # imm = 0xEEBEEBEC
; CHECK-NEXT:    movl (%eax), %ecx
; CHECK-NEXT:    movl $-289477644, %edx # imm = 0xEEBEEBF4
; CHECK-NEXT:    movl (%edx), %edx
; CHECK-NEXT:    movl $-289477648, %esi # imm = 0xEEBEEBF0
; CHECK-NEXT:    addl (%esi), %ecx
; CHECK-NEXT:    movl $-289477640, %esi # imm = 0xEEBEEBF8
; CHECK-NEXT:    addl (%esi), %edx
; CHECK-NEXT:    addl %ecx, %edx
; CHECK-NEXT:    movl %edx, (%eax)
; CHECK-NEXT:    retq
entry:
  %0 = load i32, ptr inttoptr (i32 -289477652 to ptr)
  %1 = load i32, ptr inttoptr (i32 -289477648 to ptr)
  %2 = load i32, ptr inttoptr (i32 -289477644 to ptr)
  %3 = load i32, ptr inttoptr (i32 -289477640 to ptr)
  %4 = add i32 %0, %1
  %5 = add i32 %2, %3
  %6 = add i32 %4, %5
  store i32 %6, ptr inttoptr (i32 -289477652 to ptr)
  ret void
}