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

Side by Side Diff: tests_lit/llvm2ice_tests/alloc.ll

Issue 557533003: Subzero: Make sure alloca with align=0 is handled correctly. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remap align=0 to align=1 in lowering Created 6 years, 3 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/IceTargetLoweringX8632.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; This is a basic test of the alloca instruction. 1 ; This is a basic test of the alloca instruction.
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 -Om1 --verbose none %s \ 6 ; RUN: %llvm2ice -Om1 --verbose none %s \
7 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ 7 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
8 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s 8 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
9 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s 9 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
10 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s 10 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 ; CHECK-LABEL: variable_n_align_32: 97 ; CHECK-LABEL: variable_n_align_32:
98 ; CHECK-DAG: and esp, -32 98 ; CHECK-DAG: and esp, -32
99 ; CHECK-DAG: mov eax, dword ptr [ebp + 8] 99 ; CHECK-DAG: mov eax, dword ptr [ebp + 8]
100 ; CHECK: add eax, 31 100 ; CHECK: add eax, 31
101 ; CHECK: and eax, -32 101 ; CHECK: and eax, -32
102 ; CHECK: sub esp, eax 102 ; CHECK: sub esp, eax
103 ; CHECK: sub esp, 16 103 ; CHECK: sub esp, 16
104 ; CHECK: mov dword ptr [esp], eax 104 ; CHECK: mov dword ptr [esp], eax
105 ; CHECK: call f2 105 ; CHECK: call f2
106 106
107 ; Test alloca with default (0) alignment.
108 define void @align0(i32 %n) {
109 entry:
110 %array = alloca i8, i32 %n
111 %__2 = ptrtoint i8* %array to i32
112 call void @f2(i32 %__2)
113 ret void
114 }
115 ; CHECK-LABEL: align0
116 ; CHECK: add [[REG:.*]], 15
117 ; CHECK: and [[REG]], -16
118 ; CHECK: sub esp, [[REG]]
119
107 define void @f2(i32 %ignored) { 120 define void @f2(i32 %ignored) {
108 entry: 121 entry:
109 ret void 122 ret void
110 } 123 }
111 124
112 ; ERRORS-NOT: ICE translation error 125 ; ERRORS-NOT: ICE translation error
113 ; DUMP-NOT: SZ 126 ; DUMP-NOT: SZ
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698