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

Unified Diff: tests_lit/llvm2ice_tests/reorder-global-variables.ll

Issue 1206723003: Function Layout, Global Variable Layout and Pooled Constants Layout Reordering (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 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
« no previous file with comments | « tests_lit/llvm2ice_tests/reorder-functions.ll ('k') | tests_lit/llvm2ice_tests/reorder-pooled-constants.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/reorder-global-variables.ll
diff --git a/tests_lit/llvm2ice_tests/reorder-global-variables.ll b/tests_lit/llvm2ice_tests/reorder-global-variables.ll
new file mode 100644
index 0000000000000000000000000000000000000000..b2a77ccad29d37fc5b6f02162255083135877815
--- /dev/null
+++ b/tests_lit/llvm2ice_tests/reorder-global-variables.ll
@@ -0,0 +1,72 @@
+; Test of global variable reordering.
+
+; REQUIRES: allow_dump
+
+; Test x8632 asm output
+; RUN: %if --need=target_X8632 --command %p2i --filetype=asm --target x8632 \
+; RUN: -i %s --assemble --disassemble --dis-flags=-rD \
+; RUN: --args -sz-seed=1 -reorder-global-variables -O2 \
+; RUN: | %if --need=target_X8632 --command FileCheck %s
+; RUN: %if --need=target_X8632 --command %p2i --filetype=asm --target x8632 \
+; RUN: -i %s --assemble --disassemble --dis-flags=-rD \
+; RUN: --args -sz-seed=1 -reorder-global-variables -Om1 \
+; RUN: | %if --need=target_X8632 --command FileCheck %s
+
+; Test x8632 elf output
+; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --target x8632 \
+; RUN: -i %s --disassemble --dis-flags=-rD \
+; RUN: --args -sz-seed=1 -reorder-global-variables -O2 \
+; RUN: | %if --need=target_X8632 --command FileCheck %s
+; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --target x8632 \
+; RUN: -i %s --disassemble --dis-flags=-rD \
+; RUN: --args -sz-seed=1 -reorder-global-variables -Om1 \
+; RUN: | %if --need=target_X8632 --command FileCheck %s
+
+; Test arm output
+; IAS is not implemented yet.
+; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --target arm32 \
+; RUN: -i %s --assemble --disassemble --dis-flags=-rD \
+; RUN: --args -sz-seed=1 -reorder-global-variables \
+; RUN: --skip-unimplemented -O2 \
+; RUN: | %if --need=target_ARM32 --command FileCheck %s
+; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --target arm32 \
+; RUN: -i %s --assemble --disassemble --dis-flags=-rD \
+; RUN: --args -sz-seed=1 -reorder-global-variables \
+; RUN: --skip-unimplemented -Om1 \
+; RUN: | %if --need=target_ARM32 --command FileCheck %s
+
+
+@PrimitiveInit = internal global [4 x i8] c"\1B\00\00\00", align 4
+
+@PrimitiveInitConst = internal constant [4 x i8] c"\0D\00\00\00", align 4
+
+@ArrayInit = internal global [20 x i8] c"\0A\00\00\00\14\00\00\00\1E\00\00\00(\00\00\002\00\00\00", align 4
+
+@ArrayInitPartial = internal global [40 x i8] c"<\00\00\00F\00\00\00P\00\00\00Z\00\00\00d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", align 4
+
+@PrimitiveInitStatic = internal global [4 x i8] zeroinitializer, align 4
+
+@PrimitiveUninit = internal global [4 x i8] zeroinitializer, align 4
+
+@ArrayUninit = internal global [20 x i8] zeroinitializer, align 4
+
+@ArrayUninitConstDouble = internal constant [200 x i8] zeroinitializer, align 8
+
+@ArrayUninitConstInt = internal constant [20 x i8] zeroinitializer, align 4
+
+;@__init_array_start = internal constant [0 x i8] zeroinitializer, align 4
+;@__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4
+;@__tls_template_start = internal constant [0 x i8] zeroinitializer, align 8
+;@__tls_template_alignment = internal constant [4 x i8] c"\01\00\00\00", align 4
+
+; Make sure the shuffled order is correct.
+
+; CHECK-LABEL: ArrayInitPartial
+; CHECK-LABEL: PrimitiveInit
+; CHECK-LABEL: ArrayInit
+; CHECK-LABEL: PrimitiveUninit
+; CHECK-LABEL: ArrayUninit
+; CHECK-LABEL: PrimitiveInitStatic
+; CHECK-LABEL: ArrayUninitConstDouble
+; CHECK-LABEL: ArrayUninitConstInt
+; CHECK-LABEL: PrimitiveInitConst
« no previous file with comments | « tests_lit/llvm2ice_tests/reorder-functions.ll ('k') | tests_lit/llvm2ice_tests/reorder-pooled-constants.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698