Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: tests_lit/llvm2ice_tests/address-mode-opt.ll

Issue 597003004: Subzero: Automatically infer regalloc preferences and overlap. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/llvm2ice.cpp ('k') | tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; This file checks support for address mode optimization. 1 ; This file checks support for address mode optimization.
2 2
3 ; RUN: %llvm2ice -O2 --verbose none %s \ 3 ; RUN: %llvm2ice -O2 --verbose none %s \
4 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ 4 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
5 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s 5 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
6 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s 6 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
7 7
8 define float @load_arg_plus_200000(float* %arg) { 8 define float @load_arg_plus_200000(float* %arg) {
9 entry: 9 entry:
10 %arg.int = ptrtoint float* %arg to i32 10 %arg.int = ptrtoint float* %arg to i32
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 define float @load_200000_minus_arg(float* %arg) { 41 define float @load_200000_minus_arg(float* %arg) {
42 entry: 42 entry:
43 %arg.int = ptrtoint float* %arg to i32 43 %arg.int = ptrtoint float* %arg to i32
44 %addr.int = sub i32 200000, %arg.int 44 %addr.int = sub i32 200000, %arg.int
45 %addr.ptr = inttoptr i32 %addr.int to float* 45 %addr.ptr = inttoptr i32 %addr.int to float*
46 %addr.load = load float* %addr.ptr, align 4 46 %addr.load = load float* %addr.ptr, align 4
47 ret float %addr.load 47 ret float %addr.load
48 ; CHECK-LABEL: load_200000_minus_arg: 48 ; CHECK-LABEL: load_200000_minus_arg:
49 ; CHECK: movss xmm0, dword ptr [eax] 49 ; CHECK: movss xmm0, dword ptr [e{{..}}]
50 } 50 }
51 51
52 define float @address_mode_opt_chaining(float* %arg) { 52 define float @address_mode_opt_chaining(float* %arg) {
53 entry: 53 entry:
54 %arg.int = ptrtoint float* %arg to i32 54 %arg.int = ptrtoint float* %arg to i32
55 %addr1.int = add i32 12, %arg.int 55 %addr1.int = add i32 12, %arg.int
56 %addr2.int = sub i32 %addr1.int, 4 56 %addr2.int = sub i32 %addr1.int, 4
57 %addr2.ptr = inttoptr i32 %addr2.int to float* 57 %addr2.ptr = inttoptr i32 %addr2.int to float*
58 %addr2.load = load float* %addr2.ptr, align 4 58 %addr2.load = load float* %addr2.ptr, align 4
59 ret float %addr2.load 59 ret float %addr2.load
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 %addr1.ptr = inttoptr i32 %addr1.int to float* 117 %addr1.ptr = inttoptr i32 %addr1.int to float*
118 %addr1.load = load float* %addr1.ptr, align 4 118 %addr1.load = load float* %addr1.ptr, align 4
119 ret float %addr1.load 119 ret float %addr1.load
120 ; CHECK-LABEL: address_mode_opt_sub_min_int: 120 ; CHECK-LABEL: address_mode_opt_sub_min_int:
121 ; CHECK: movss xmm0, dword ptr [{{.*}} - 2147483648] 121 ; CHECK: movss xmm0, dword ptr [{{.*}} - 2147483648]
122 } 122 }
123 123
124 124
125 125
126 ; ERRORS-NOT: ICE translation error 126 ; ERRORS-NOT: ICE translation error
OLDNEW
« no previous file with comments | « src/llvm2ice.cpp ('k') | tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698