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

Side by Side Diff: test/Transforms/NaCl/pnacl-abi-simplify-preopt.ll

Issue 135953002: PNaCl: Fix handling of va_arg on structs in simplification passes (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Update comment Created 6 years, 11 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 | « lib/Transforms/NaCl/PNaClABISimplify.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 ; RUN: opt %s -pnacl-abi-simplify-preopt -S | FileCheck %s 1 ; RUN: opt %s -pnacl-abi-simplify-preopt -S | FileCheck %s
2 2
3 ; "-pnacl-abi-simplify-preopt" runs various passes which are tested 3 ; "-pnacl-abi-simplify-preopt" runs various passes which are tested
4 ; thoroughly in other *.ll files. This file is a smoke test to check 4 ; thoroughly in other *.ll files. This file is a smoke test to check
5 ; that "-pnacl-abi-simplify-preopt" runs what it's supposed to run. 5 ; that "-pnacl-abi-simplify-preopt" runs what it's supposed to run.
6 6
7 declare void @ext_func() 7 declare void @ext_func()
8 8
9 9
10 define void @invoke_func() { 10 define void @invoke_func() {
11 invoke void @ext_func() to label %cont unwind label %lpad 11 invoke void @ext_func() to label %cont unwind label %lpad
12 cont: 12 cont:
13 ret void 13 ret void
14 lpad: 14 lpad:
15 %lp = landingpad { i8*, i32 } personality i8* null cleanup 15 %lp = landingpad { i8*, i32 } personality i8* null cleanup
16 ret void 16 ret void
17 } 17 }
18 ; CHECK-NOT: invoke void @ext_func() 18 ; CHECK-NOT: invoke void @ext_func()
19 ; CHECK-NOT: landingpad 19 ; CHECK-NOT: landingpad
20 20
21 21
22 define void @varargs_func(...) { 22 define void @varargs_func(...) {
23 ret void 23 ret void
24 } 24 }
25 ; CHECK-NOT: @varargs_func(...) 25 ; CHECK-NOT: @varargs_func(...)
26 26
27 27
28 %MyStruct = type { i32, i32 }
29
30 ; Checks that ExpandVarArgs and ExpandStructRegs are applied in the
31 ; right order.
32 define void @get_struct_from_varargs(i8* %va_list, %MyStruct* %dest) {
33 %val = va_arg i8* %va_list, %MyStruct
34 store %MyStruct %val, %MyStruct* %dest
35 ret void
36 }
37 ; CHECK-NOT: va_arg
38
39
28 @llvm.global_ctors = appending global [0 x { i32, void ()* }] zeroinitializer 40 @llvm.global_ctors = appending global [0 x { i32, void ()* }] zeroinitializer
29 ; CHECK-NOT: @llvm.global_ctors 41 ; CHECK-NOT: @llvm.global_ctors
30 42
31 @tls_var = thread_local global i32 0 43 @tls_var = thread_local global i32 0
32 ; CHECK-NOT: thread_local 44 ; CHECK-NOT: thread_local
33 45
34 @alias = alias i32* @tls_var 46 @alias = alias i32* @tls_var
35 ; CHECK-NOT: @alias 47 ; CHECK-NOT: @alias
36 48
37 @weak_ref = extern_weak global i8* 49 @weak_ref = extern_weak global i8*
38 ; CHECK-NOT: extern_weak 50 ; CHECK-NOT: extern_weak
OLDNEW
« no previous file with comments | « lib/Transforms/NaCl/PNaClABISimplify.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698