llvm.org GIT mirror llvm / c3d5c1c
Rewrite test/Verifier tests to use FileCheck instead of grep git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179036 91177308-0d34-0410-b5e6-96231b3b80d8 Eli Bendersky 7 years ago
13 changed file(s) with 28 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
None ; RUN: not llvm-as < %s 2>&1 | grep "value doesn't match function result type 'i32'"
0 ; RUN: not llvm-as < %s 2>&1 | FileCheck %s
11
22 ; Verify the operand type of the ret instructions in a function match the
3 ; delcared return type of the function they live in.
3 ; declared return type of the function they live in.
4 ; CHECK: value doesn't match function result type 'i32'
45 ;
56
67 define i32 @testfunc() {
None ; RUN: not llvm-as < %s 2>&1 | grep "invalid getelementptr indices"
0 ; RUN: not llvm-as < %s 2>&1 | FileCheck %s
1 ; CHECK: invalid getelementptr indices
12
23 ; This testcase is invalid because we are indexing into a pointer that is
34 ; contained WITHIN a structure.
None ; RUN: llvm-as < %s 2>&1 | not grep "Instruction operands must be first-class"
0 ; RUN: llvm-as < %s 2>&1 | FileCheck %s
1
2 ; CHECK-NOT: Instruction operands must be first-class
13
24 ; This previously was for PR826, but structs are now first-class so
35 ; the following is now valid.
0 ; RUN: not llvm-as < %s > /dev/null 2> %t
1 ; RUN: grep "basic block pointers are invalid" %t
1 ; RUN: FileCheck %s --input-file=%t
2 ; CHECK: basic block pointers are invalid
23
34 define i32 @main() {
45 %foo = call i8* %llvm.stacksave()
None ; RUN: not llvm-as < %s 2>&1 | grep "llvm intrinsics cannot be defined"
0 ; RUN: not llvm-as < %s 2>&1 | FileCheck %s
1 ; CHECK: llvm intrinsics cannot be defined
12 ; PR1047
23
34 define void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) {
None ; RUN: not llvm-as %s -o /dev/null 2>&1 | grep "Cannot allocate unsized type"
0 ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
1 ; CHECK: Cannot allocate unsized type
12 ; PR2113
23
34 define void @test() {
None ; RUN: not llvm-as %s -o /dev/null 2>&1 | grep "alignment argument of memory intrinsics must be a constant int"
0 ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
1 ; CHECK: alignment argument of memory intrinsics must be a constant int
12 ; PR2318
23
34 define void @x(i8* %a, i8* %src, i64 %len, i32 %align) nounwind {
None ; RUN: not llvm-as < %s 2>&1 | grep "value doesn't match function result type 'void'"
0 ; RUN: not llvm-as < %s 2>&1 | FileCheck %s
1 ; CHECK: value doesn't match function result type 'void'
12
23 define void @foo() {
34 ret i32 0
0 ; RUN: not llvm-as < %s 2> %t
1 ; RUN: grep "Broken module" %t
1 ; RUN: FileCheck %s --input-file=%t
2 ; CHECK: Broken module
23 ; PR7316
34
45 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32"
None ; RUN: not llvm-as < %s 2>&1 | grep "multiple entries for the same basic block"
1
2
0 ; RUN: not llvm-as < %s 2>&1 | FileCheck %s
1 ; CHECK: multiple entries for the same basic block
32
43 define i32 @test(i32 %i, i32 %j, i1 %c) {
54 br i1 %c, label %A, label %A
None ; RUN: not llvm-as < %s 2>&1 | grep "PHI nodes not grouped at top"
1
2
0 ; RUN: not llvm-as < %s 2>&1 | FileCheck %s
1 ; CHECK: PHI nodes not grouped at top
32
43 define i32 @test(i32 %i, i32 %j, i1 %c) {
54 br i1 %c, label %A, label %B
None ; RUN: not llvm-as %s -o /dev/null 2>&1 | grep "Only PHI nodes may reference their own value"
0 ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
1 ; CHECK: Only PHI nodes may reference their own value
12
23 ; Test that self referential instructions are not allowed
34
None ; RUN: not llvm-as %s -o /dev/null 2>&1 | grep "Aliasing chain should end with function or global variable"
1
0 ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
1 ; CHECK: Aliasing chain should end with function or global variable
22 ; Test that alising chain does not create a cycle
33
44 @b1 = alias i32* @c1