fa90c96c803c44eef1f6689aa73b51ea1f918f84
[oota-llvm.git] / test / Assembler / invalid-OperatorConstraint.ll
1 ; RUN: sed -e s/.T1:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK1 %s
2 ; RUN: sed -e s/.T2:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK2 %s
3 ; RUN: sed -e s/.T3:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK3 %s
4 ; RUN: sed -e s/.T4:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK4 %s
5 ; RUN: sed -e s/.T5:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK5 %s
6 ; RUN: sed -e s/.T6:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK6 %s
7 ; RUN: sed -e s/.T7:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK7 %s
8 ; RUN: sed -e s/.T8:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK8 %s
9 ; RUN: sed -e s/.T9:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK9 %s
10
11 ;T1: define void @f() {
12 ;T1:   entry:
13 ;T1:     ; operator constraint requires an operator
14 ;T1:     catchret undef to label %entry
15 ;T1:     ; CHECK1: [[@LINE-1]]:15: error: Catchpad value required in this position
16 ;T1: }
17
18 ;T2: define void @f() {
19 ;T2:   entry:
20 ;T2:     %x = cleanuppad []
21 ;T2:     ; catchret's first operand's operator must be catchpad
22 ;T2:     catchret %x to label %entry
23 ;T2:     ; CHECK2: [[@LINE-1]]:15: error: '%x' is not a catchpad
24 ;T2: }
25
26 ;T3: define void @f() {
27 ;T3:   entry:
28 ;T3:     ; catchret's first operand's operator must be catchpad
29 ;T3:     ; (forward reference case)
30 ;T3:     catchret %x to label %next
31 ;T3:     ; CHECK3: [[@LINE-1]]:15: error: '%x' is not a catchpad
32 ;T3:   next:
33 ;T3:     %x = cleanuppad []
34 ;T3:     ret void
35 ;T3: }
36
37 ;T4: define void @f() {
38 ;T4:   entry:
39 ;T4:     ; operator constraint requires an operator
40 ;T4:     cleanupret undef unwind label %entry
41 ;T4:     ; CHECK4: [[@LINE-1]]:17: error: Cleanuppad value required in this position
42 ;T4: }
43
44 ;T5: define void @f() {
45 ;T5:   entry:
46 ;T5:     %x = catchpad []
47 ;T5:             to label %next unwind label %entry
48 ;T5:   next:
49 ;T5:     ; cleanupret first operand's operator must be cleanuppad
50 ;T5:     cleanupret %x unwind to caller
51 ;T5:     ; CHECK5: [[@LINE-1]]:17: error: '%x' is not a cleanuppad
52 ;T5: }
53
54 ;T6: define void @f() {
55 ;T6:   entry:
56 ;T6:     ; cleanupret's first operand's operator must be cleanuppad
57 ;T6:     ; (forward reference case)
58 ;T6:     cleanupret %x unwind label %next
59 ;T6:     ; CHECK6: [[@LINE-1]]:17: error: '%x' is not a cleanuppad
60 ;T6:   next:
61 ;T6:     %x = catchpad [] to label %entry unwind label %next
62 ;T6: }
63
64 ;T7: define void @f() {
65 ;T7:   entry:
66 ;T7:     ; operator constraint requires an operator
67 ;T7:     cleanupendpad undef unwind to caller
68 ;T7:     ; CHECK7: [[@LINE-1]]:20: error: Cleanuppad value required in this position
69 ;T7: }
70
71 ;T8: define void @f() {
72 ;T8:   entry:
73 ;T8:     %x = catchpad []
74 ;T8:             to label %next unwind label %entry
75 ;T8:   next:
76 ;T8:     ; cleanupret first operand's operator must be cleanuppad
77 ;T8:     cleanupendpad %x unwind label next
78 ;T8:     ; CHECK8: [[@LINE-1]]:20: error: '%x' is not a cleanuppad
79 ;T8: }
80
81 ;T9: define void @f() {
82 ;T9:   entry:
83 ;T9:     ; cleanupret's first operand's operator must be cleanuppad
84 ;T9:     ; (forward reference case)
85 ;T9:     cleanupendpad %x unwind label %next
86 ;T9:     ; CHECK9: [[@LINE-1]]:20: error: '%x' is not a cleanuppad
87 ;T9:   next:
88 ;T9:     %x = catchpad [] to label %entry unwind label %next
89 ;T9: }