source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Bitcode/invalid.test @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 9.9 KB
Line 
1RUN: not llvm-dis -disable-output %p/Inputs/invalid-pr20485.bc 2>&1 | \
2RUN:   FileCheck --check-prefix=INVALID-ENCODING %s
3RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev.bc 2>&1 | \
4RUN:   FileCheck --check-prefix=BAD-ABBREV %s
5RUN: not llvm-dis -disable-output %p/Inputs/invalid-unexpected-eof.bc 2>&1 | \
6RUN:   FileCheck --check-prefix=UNEXPECTED-EOF %s
7RUN: not llvm-dis -disable-output %p/Inputs/invalid-bad-abbrev-number.bc 2>&1 | \
8RUN:   FileCheck --check-prefix=BAD-ABBREV-NUMBER %s
9RUN: not llvm-dis -disable-output %p/Inputs/invalid-type-table-forward-ref.bc 2>&1 | \
10RUN:   FileCheck --check-prefix=BAD-TYPE-TABLE-FORWARD-REF %s
11RUN: not llvm-dis -disable-output %p/Inputs/invalid-bitwidth.bc 2>&1 | \
12RUN:   FileCheck --check-prefix=BAD-BITWIDTH %s
13RUN: not llvm-dis -disable-output %p/Inputs/invalid-align.bc  2>&1 | \
14RUN:   FileCheck --check-prefix=BAD-ALIGN %s
15RUN: not llvm-dis -disable-output %p/Inputs/invalid-gep-mismatched-explicit-type.bc 2>&1 | \
16RUN:   FileCheck --check-prefix=MISMATCHED-EXPLICIT-GEP %s
17RUN: not llvm-dis -disable-output %p/Inputs/invalid-load-mismatched-explicit-type.bc 2>&1 | \
18RUN:   FileCheck --check-prefix=MISMATCHED-EXPLICIT-LOAD %s
19RUN: not llvm-dis -disable-output %p/Inputs/invalid-gep-operator-mismatched-explicit-type.bc 2>&1 | \
20RUN:   FileCheck --check-prefix=MISMATCHED-EXPLICIT-GEP-OPERATOR %s
21RUN: not llvm-dis -disable-output %p/Inputs/invalid-call-mismatched-explicit-type.bc 2>&1 | \
22RUN:   FileCheck --check-prefix=MISMATCHED-EXPLICIT-CALL %s
23RUN: not llvm-dis -disable-output %p/Inputs/invalid-call-non-function-explicit-type.bc 2>&1 | \
24RUN:   FileCheck --check-prefix=NON-FUNCTION-EXPLICIT-CALL %s
25RUN: not llvm-dis -disable-output %p/Inputs/invalid-invoke-mismatched-explicit-type.bc 2>&1 | \
26RUN:   FileCheck --check-prefix=MISMATCHED-EXPLICIT-INVOKE %s
27RUN: not llvm-dis -disable-output %p/Inputs/invalid-invoke-non-function-explicit-type.bc 2>&1 | \
28RUN:   FileCheck --check-prefix=NON-FUNCTION-EXPLICIT-INVOKE %s
29
30INVALID-ENCODING: Invalid encoding
31BAD-ABBREV: Abbreviation starts with an Array or a Blob
32UNEXPECTED-EOF: Unexpected end of file
33BAD-ABBREV-NUMBER: Invalid abbrev number
34BAD-TYPE-TABLE-FORWARD-REF: Invalid TYPE table: Only named structs can be forward referenced
35BAD-BITWIDTH: Bitwidth for integer type out of range
36BAD-ALIGN: Invalid alignment value
37MISMATCHED-EXPLICIT-GEP: Explicit gep type does not match pointee type of pointer operand
38MISMATCHED-EXPLICIT-LOAD: Explicit load/store type does not match pointee type of pointer operand
39MISMATCHED-EXPLICIT-GEP-OPERATOR: Explicit gep operator type does not match pointee type of pointer operand
40MISMATCHED-EXPLICIT-CALL: Explicit call type does not match pointee type of callee operand
41NON-FUNCTION-EXPLICIT-CALL: Explicit call type is not a function type
42MISMATCHED-EXPLICIT-INVOKE: Explicit invoke type does not match pointee type of callee operand
43NON-FUNCTION-EXPLICIT-INVOKE: Explicit invoke type is not a function type
44
45RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-array-idx.bc 2>&1 | \
46RUN:   FileCheck --check-prefix=EXTRACT-ARRAY %s
47RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-struct-idx.bc 2>&1 | \
48RUN:   FileCheck --check-prefix=EXTRACT-STRUCT %s
49RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-too-many-idxs.bc 2>&1 | \
50RUN:   FileCheck --check-prefix=EXTRACT-IDXS %s
51RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-array-idx.bc 2>&1 | \
52RUN:   FileCheck --check-prefix=INSERT-ARRAY %s
53RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-struct-idx.bc 2>&1 | \
54RUN:   FileCheck --check-prefix=INSERT-STRUCT %s
55RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-too-many-idxs.bc 2>&1 | \
56RUN:   FileCheck --check-prefix=INSERT-IDXS %s
57
58
59EXTRACT-ARRAY: EXTRACTVAL: Invalid array index
60EXTRACT-STRUCT: EXTRACTVAL: Invalid struct index
61EXTRACT-IDXS: EXTRACTVAL: Invalid type
62INSERT-ARRAY: INSERTVAL: Invalid array index
63INSERT-STRUCT: INSERTVAL: Invalid struct index
64INSERT-IDXS: INSERTVAL: Invalid type
65
66RUN: not llvm-dis -disable-output %p/Inputs/invalid-no-proper-module.bc 2>&1 | \
67RUN:   FileCheck --check-prefix=NO-MODULE %s
68
69NO-MODULE: Malformed IR file
70
71RUN: not llvm-dis -disable-output %p/Inputs/invalid-fp-shift.bc 2>&1 | \
72RUN:   FileCheck --check-prefix=FP-SHIFT %s
73
74FP-SHIFT: Invalid record
75
76RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev-vbr-size-too-big.bc 2>&1 | \
77RUN:   FileCheck --check-prefix=HUGE-ABBREV-OP %s
78RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev-fixed-size-too-big.bc 2>&1 | \
79RUN:   FileCheck --check-prefix=HUGE-ABBREV-OP %s
80
81HUGE-ABBREV-OP: Fixed or VBR abbrev record with size > MaxChunkData
82
83RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-type.bc 2>&1 | \
84RUN:   FileCheck --check-prefix=ARRAY-TYPE %s
85
86ARRAY-TYPE: Array element type can't be an Array or a Blob
87
88RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-extractelement.bc 2>&1 | \
89RUN:   FileCheck --check-prefix=INVALID-TYPE %s
90RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-insertelement.bc 2>&1 | \
91RUN:   FileCheck --check-prefix=INVALID-TYPE %s
92RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-shufflevector.bc 2>&1 | \
93RUN:   FileCheck --check-prefix=INVALID-TYPE %s
94
95INVALID-TYPE: Invalid type for value
96
97RUN: not llvm-dis -disable-output %p/Inputs/invalid-fwdref-type-mismatch.bc 2>&1 | \
98RUN:   FileCheck --check-prefix=FWDREF-TYPE %s
99
100FWDREF-TYPE: Invalid record
101
102RUN: not llvm-dis -disable-output %p/Inputs/invalid-fwdref-type-mismatch-2.bc 2>&1 | \
103RUN:   FileCheck --check-prefix=FWDREF-TYPE-MISMATCH %s
104
105FWDREF-TYPE-MISMATCH: Type mismatch in constant table!
106
107RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-element-type.bc 2>&1 | \
108RUN:   FileCheck --check-prefix=ELEMENT-TYPE %s
109RUN: not llvm-dis -disable-output %p/Inputs/invalid-vector-element-type.bc 2>&1 | \
110RUN:   FileCheck --check-prefix=ELEMENT-TYPE %s
111RUN: not llvm-dis -disable-output %p/Inputs/invalid-pointer-element-type.bc 2>&1 | \
112RUN:   FileCheck --check-prefix=ELEMENT-TYPE %s
113
114ELEMENT-TYPE: Invalid type
115
116RUN: not llvm-dis -disable-output %p/Inputs/invalid-cast.bc 2>&1 | \
117RUN:   FileCheck --check-prefix=INVALID-CAST %s
118
119INVALID-CAST: Invalid cast
120
121RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-op-not-2nd-to-last.bc 2>&1 | \
122RUN:   FileCheck --check-prefix=ARRAY-NOT-2LAST %s
123
124ARRAY-NOT-2LAST: Array op not second to last
125
126RUN: not llvm-dis -disable-output %p/Inputs/invalid-too-big-fwdref.bc 2>&1 | \
127RUN:   FileCheck --check-prefix=HUGE-FWDREF %s
128
129HUGE-FWDREF: Invalid record
130
131RUN: not llvm-dis -disable-output %p/Inputs/invalid-load-pointer-type.bc 2>&1 | \
132RUN:   FileCheck --check-prefix=LOAD-BAD-TYPE %s
133
134LOAD-BAD-TYPE: Load/Store operand is not a pointer type
135
136RUN: not llvm-dis -disable-output %p/Inputs/invalid-GCTable-overflow.bc 2>&1 | \
137RUN:   FileCheck --check-prefix=GCTABLE-OFLOW %s
138
139GCTABLE-OFLOW: Invalid ID
140
141RUN: not llvm-dis -disable-output %p/Inputs/invalid-insert-0-indices.bc 2>&1 | \
142RUN:   FileCheck --check-prefix=INSERT-0-IDXS %s
143
144INSERT-0-IDXS: INSERTVAL: Invalid instruction with 0 indices
145
146RUN: not llvm-dis -disable-output %p/Inputs/invalid-extract-0-indices.bc 2>&1 | \
147RUN:   FileCheck --check-prefix=EXTRACT-0-IDXS %s
148
149EXTRACT-0-IDXS: EXTRACTVAL: Invalid instruction with 0 indices
150
151RUN: not llvm-dis -disable-output %p/Inputs/invalid-load-ptr-type.bc 2>&1 | \
152RUN:   FileCheck --check-prefix=BAD-LOAD-PTR-TYPE %s
153
154BAD-LOAD-PTR-TYPE: Cannot load/store from pointer
155
156RUN: not llvm-dis -disable-output %p/Inputs/invalid-inserted-value-type-mismatch.bc 2>&1 | \
157RUN:   FileCheck --check-prefix=INSERT-TYPE-MISMATCH %s
158
159INSERT-TYPE-MISMATCH: Inserted value type doesn't match aggregate type
160
161RUN: not llvm-dis -disable-output %p/Inputs/invalid-code-len-width.bc 2>&1 | \
162RUN:   FileCheck --check-prefix=INVALID-CODELENWIDTH %s
163
164INVALID-CODELENWIDTH: Malformed block
165
166RUN: not llvm-dis -disable-output %p/Inputs/invalid-function-argument-type.bc 2>&1 | \
167RUN:   FileCheck --check-prefix=INVALID-ARGUMENT-TYPE %s
168
169INVALID-ARGUMENT-TYPE: Invalid function argument type
170
171RUN: not llvm-dis -disable-output %p/Inputs/invalid-fixme-streaming-blob.bc 2>&1 | \
172RUN:   FileCheck --check-prefix=STREAMING-BLOB %s
173
174STREAMING-BLOB: getPointer in streaming memory objects not allowed
175
176RUN: not llvm-dis -disable-output %p/Inputs/invalid-function-comdat-id.bc 2>&1 | \
177RUN:   FileCheck --check-prefix=INVALID-FCOMDAT-ID %s
178
179INVALID-FCOMDAT-ID: Invalid function comdat ID
180
181RUN: not llvm-dis -disable-output %p/Inputs/invalid-global-var-comdat-id.bc 2>&1 | \
182RUN:   FileCheck --check-prefix=INVALID-GVCOMDAT-ID %s
183
184INVALID-GVCOMDAT-ID: Invalid global variable comdat ID
185
186RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev-no-operands.bc 2>&1 | \
187RUN:   FileCheck --check-prefix=ABBREV-NO-OPS %s
188
189ABBREV-NO-OPS: Abbrev record with no operands
190
191RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-operand-encoding.bc 2>&1 | \
192RUN:   FileCheck --check-prefix=ARRAY-OP-ENC %s
193
194ARRAY-OP-ENC: Array element type has to be an encoding of a type
195
196RUN: not llvm-dis -disable-output %p/Inputs/invalid-metadata-not-followed-named-node.bc 2>&1 | \
197RUN:   FileCheck --check-prefix=META-NOT-FOLLOWED-BY-NAMED-META %s
198
199META-NOT-FOLLOWED-BY-NAMED-META: METADATA_NAME not followed by METADATA_NAMED_NODE
200
201RUN: not llvm-dis -disable-output %p/Inputs/invalid-vector-length.bc 2>&1 | \
202RUN:   FileCheck --check-prefix=VECTOR-LENGTH %s
203
204VECTOR-LENGTH: Invalid vector length
205
206RUN: not llvm-dis -disable-output %p/Inputs/invalid-alias-type-mismatch.bc 2>&1 | \
207RUN:   FileCheck --check-prefix=ALIAS-TYPE-MISMATCH %s
208
209ALIAS-TYPE-MISMATCH: Alias and aliasee types don't match
210
211RUN: not llvm-dis -disable-output %p/Inputs/invalid-no-function-block.bc 2>&1 | \
212RUN:   FileCheck --check-prefix=NO-FUNCTION-BLOCK %s
213
214NO-FUNCTION-BLOCK: Trying to materialize functions before seeing function blocks
215
216RUN: not llvm-dis -disable-output %p/Inputs/invalid-name-with-0-byte.bc 2>&1 | \
217RUN:   FileCheck --check-prefix=NAME-WITH-0 %s
218
219NAME-WITH-0: Invalid value name
Note: See TracBrowser for help on using the repository browser.