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

Unified Diff: tests_lit/llvm2ice_tests/alloc.ll

Issue 2067183002: [Subzero][MIPS32] Implements lowering of alloca instruction (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« src/IceTargetLoweringMIPS32.cpp ('K') | « src/IceTargetLoweringMIPS32.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/alloc.ll
diff --git a/tests_lit/llvm2ice_tests/alloc.ll b/tests_lit/llvm2ice_tests/alloc.ll
index cf0926c8bfea3b346983547bf0547778f6e06cf9..3be09f6d226d5a0cef4c7f25daa8c558147b4fd1 100644
--- a/tests_lit/llvm2ice_tests/alloc.ll
+++ b/tests_lit/llvm2ice_tests/alloc.ll
@@ -26,6 +26,20 @@
; RUN: | %if --need=target_ARM32 --need=allow_dump \
; RUN: --command FileCheck --check-prefix ARM32 --check-prefix=ARM-OPTM1 %s
+; RUN: %if --need=target_MIPS32 --need=allow_dump \
+; RUN: --command %p2i --filetype=asm --assemble \
+; RUN: --disassemble --target mips32 -i %s --args -O2 --skip-unimplemented \
+; RUN: -allow-externally-defined-symbols \
+; RUN: | %if --need=target_MIPS32 --need=allow_dump \
+; RUN: --command FileCheck --check-prefix MIPS32 --check-prefix=MIPS32-OPT2 %s
+
+; RUN: %if --need=target_MIPS32 --need=allow_dump \
+; RUN: --command %p2i --filetype=asm --assemble \
+; RUN: --disassemble --target mips32 -i %s --args -Om1 --skip-unimplemented \
+; RUN: -allow-externally-defined-symbols \
+; RUN: | %if --need=target_MIPS32 --need=allow_dump \
+; RUN: --command FileCheck --check-prefix MIPS32 --check-prefix=MIPS32-OPTM1 %s
+
define internal void @fixed_416_align_16(i32 %n) {
entry:
%array = alloca i8, i32 416, align 16
@@ -50,6 +64,10 @@ entry:
; ARM32-OPTM1: sub sp, sp, #416
; ARM32: bl {{.*}} R_{{.*}} f1
+; MIPS32-LABEL: fixed_416_align_16
+; MIPS32-OPT2: addiu sp,sp,-440
+; MIPS32-OPTM1: addiu sp,sp,-448
+
define internal void @fixed_416_align_32(i32 %n) {
entry:
%array = alloca i8, i32 400, align 32
@@ -72,6 +90,10 @@ entry:
; ARM32: bic sp, sp, #31
; ARM32: bl {{.*}} R_{{.*}} f1
+; MIPS32-LABEL: fixed_416_align_32
+; MIPS32-OPT2: addiu sp,sp,-440
+; MIPS32-OPTM1: addiu sp,sp,-448
+
; Show that the amount to allocate will be rounded up.
define internal void @fixed_351_align_16(i32 %n) {
entry:
@@ -97,6 +119,10 @@ entry:
; ARM32-OPTM1: sub sp, sp, #352
; ARM32: bl {{.*}} R_{{.*}} f1
+; MIPS32-LABEL: fixed_351_align_16
+; MIPS32-OPT2: addiu sp,sp,-376
+; MIPS32-OPTM1: addiu sp,sp,-384
+
define internal void @fixed_351_align_32(i32 %n) {
entry:
%array = alloca i8, i32 351, align 32
@@ -119,6 +145,10 @@ entry:
; ARM32: bic sp, sp, #31
; ARM32: bl {{.*}} R_{{.*}} f1
+; MIPS32-LABEL: fixed_351_align_32
+; MIPS32-OPT2: addiu sp,sp,-376
+; MIPS32-OPTM1: addiu sp,sp,-384
+
declare void @f1(i32 %ignored)
declare void @f2(i32 %ignored)
« src/IceTargetLoweringMIPS32.cpp ('K') | « src/IceTargetLoweringMIPS32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698