1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-linux-gnux32 | FileCheck %s
4 define void @constant_expressions() {
5 ; CHECK-LABEL: constant_expressions:
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: movl $-289477652, %eax # imm = 0xEEBEEBEC
8 ; CHECK-NEXT: movl (%eax), %ecx
9 ; CHECK-NEXT: movl $-289477644, %edx # imm = 0xEEBEEBF4
10 ; CHECK-NEXT: movl (%edx), %edx
11 ; CHECK-NEXT: movl $-289477648, %esi # imm = 0xEEBEEBF0
12 ; CHECK-NEXT: addl (%esi), %ecx
13 ; CHECK-NEXT: movl $-289477636, %esi # imm = 0xEEBEEBFC
14 ; CHECK-NEXT: addl (%esi), %edx
15 ; CHECK-NEXT: addl %ecx, %edx
16 ; CHECK-NEXT: movl %edx, (%eax)
19 %0 = load i32, i32* inttoptr (i32 add (i32 -289477652, i32 0) to i32*)
20 %1 = load i32, i32* inttoptr (i32 add (i32 -289477652, i32 4) to i32*)
21 %2 = load i32, i32* inttoptr (i32 add (i32 -289477652, i32 8) to i32*)
22 %3 = load i32, i32* inttoptr (i32 add (i32 -289477652, i32 16) to i32*)
26 store i32 %6, i32* inttoptr (i32 add (i32 -289477652, i32 0) to i32*)
31 define void @constant_expressions2() {
32 ; CHECK-LABEL: constant_expressions2:
33 ; CHECK: # %bb.0: # %entry
34 ; CHECK-NEXT: movl $-289477652, %eax # imm = 0xEEBEEBEC
35 ; CHECK-NEXT: movl (%eax), %ecx
36 ; CHECK-NEXT: movl $-289477644, %edx # imm = 0xEEBEEBF4
37 ; CHECK-NEXT: movl (%edx), %edx
38 ; CHECK-NEXT: movl $-289477648, %esi # imm = 0xEEBEEBF0
39 ; CHECK-NEXT: addl (%esi), %ecx
40 ; CHECK-NEXT: movl $-289477640, %esi # imm = 0xEEBEEBF8
41 ; CHECK-NEXT: addl (%esi), %edx
42 ; CHECK-NEXT: addl %ecx, %edx
43 ; CHECK-NEXT: movl %edx, (%eax)
46 %0 = load i32, i32* inttoptr (i32 -289477652 to i32*)
47 %1 = load i32, i32* inttoptr (i32 -289477648 to i32*)
48 %2 = load i32, i32* inttoptr (i32 -289477644 to i32*)
49 %3 = load i32, i32* inttoptr (i32 -289477640 to i32*)
53 store i32 %6, i32* inttoptr (i32 -289477652 to i32*)