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

Side by Side Diff: test/NaCl/PNaClABI/types-function.ll

Issue 14329025: Check for metadata in PNaCl ABI checker. (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: cleanup Created 7 years, 8 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
OLDNEW
1 ; RUN: pnacl-abicheck < %s | FileCheck %s 1 ; RUN: pnacl-abicheck < %s | FileCheck %s
2 ; Test type-checking in function bodies. This test is not intended to verify 2 ; Test type-checking in function bodies. This test is not intended to verify
3 ; all the rules about the various types, but instead to make sure that types 3 ; all the rules about the various types, but instead to make sure that types
4 ; stashed in various places in function bodies are caught. 4 ; stashed in various places in function bodies are caught.
5 5
6 @a2 = private global i17 zeroinitializer 6 @a2 = private global i17 zeroinitializer
7 declare void @func(i15 %arg) 7 declare void @func(i15 %arg)
8 8
9 !llvm.foo = !{!0} 9 !llvm.foo = !{!0}
10 !0 = metadata !{ half 0.0} 10 !0 = metadata !{ half 0.0}
11 11
12 define void @types() { 12 define void @types() {
13 ; CHECK: Function types has instruction with disallowed type: half 13 ; CHECK: Function types has instruction with disallowed type: half
14 %h1 = fptrunc double undef to half 14 %h1 = fptrunc double undef to half
15 ; CHECK: Function types has instruction operand with disallowed type: half 15 ; CHECK: Function types has instruction operand with disallowed type: half
16 %h2 = bitcast half 0.0 to i16 16 %h2 = bitcast half 0.0 to i16
17 ; see below... 17 ; see below...
18 %h3 = fadd double 0.0, fpext (half 0.0 to double) 18 %h3 = fadd double 0.0, fpext (half 0.0 to double)
19 19
20 ; TODO(mseaborn): Re-enable integer size checking. 20 ; TODO(mseaborn): Re-enable integer size checking.
21 ; See https://code.google.com/p/nativeclient/issues/detail?id=3360 21 ; See https://code.google.com/p/nativeclient/issues/detail?id=3360
22 ; C;HECK: Function types has instruction operand with disallowed type: i17* 22 ; C;HECK: Function types has instruction operand with disallowed type: i17*
23 ; store i32 0, i32* bitcast (i17* @a2 to i32*), align 4 23 ; store i32 0, i32* bitcast (i17* @a2 to i32*), align 4
24 ; C;HECK: Function types has instruction operand with disallowed type: i15 24 ; C;HECK: Function types has instruction operand with disallowed type: i15
25 ; call void @func(i15 1) 25 ; call void @func(i15 1)
26 26
27 ; CHECK: Function types has instruction metadata containing disallowed type: hal f 27 ; CHECK: Function types has disallowed instruction metadata
Mark Seaborn 2013/04/25 18:04:32 Change to "...metadata: !foo" to check reporting o
jvoung (off chromium) 2013/04/25 23:22:20 Not sure what you mean? What is "...metadata:" ?
Mark Seaborn 2013/04/25 23:25:50 I meant you can change it to: "; CHECK: Function t
jvoung (off chromium) 2013/04/26 16:51:29 Done.
28 ret void, !foo !0 28 ret void, !foo !0
29 } 29 }
30 ; CHECK-NOT: disallowed 30 ; CHECK-NOT: disallowed
31 31
32 32
33 ; TODO: 33 ; TODO:
34 ; the bitcode reader seems to expand some operations inline 34 ; the bitcode reader seems to expand some operations inline
35 ; (e.g. fpext, sext, uitofp) such that doing something like 35 ; (e.g. fpext, sext, uitofp) such that doing something like
36 ; %h3 = fadd double 0.0, fpext (half 0.0 to double) 36 ; %h3 = fadd double 0.0, fpext (half 0.0 to double)
37 ; means the verifier pass will never see the fpext or its operands 37 ; means the verifier pass will never see the fpext or its operands
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698