Diego Novillo | cbfbc24 | 2015-05-13 15:13:45 +0000 | [diff] [blame] | 1 | ; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s |
| 2 | |
| 3 | define i32 @bad1() !prof !0 { |
| 4 | ret i32 0 |
| 5 | } |
| 6 | |
| 7 | !0 = !{i32 123, i32 3} |
| 8 | ; CHECK: assembly parsed, but does not verify as correct! |
| 9 | ; CHECK-NEXT: expected string with name of the !prof annotation |
| 10 | ; CHECK-NEXT: !0 = !{i32 123, i32 3} |
| 11 | |
| 12 | define i32 @bad2() !prof !1 { |
| 13 | ret i32 0 |
| 14 | } |
| 15 | |
| 16 | !1 = !{!"function_entry_count"} |
Dehao Chen | 191ffc1 | 2017-02-28 18:09:44 +0000 | [diff] [blame] | 17 | ; CHECK-NEXT: !prof annotations should have no less than 2 operands |
Diego Novillo | cbfbc24 | 2015-05-13 15:13:45 +0000 | [diff] [blame] | 18 | ; CHECK-NEXT: !1 = !{!"function_entry_count"} |
| 19 | |
| 20 | |
| 21 | define i32 @bad3() !prof !2 { |
| 22 | ret i32 0 |
| 23 | } |
| 24 | |
| 25 | !2 = !{!"some_other_count", i64 200} |
| 26 | ; CHECK-NEXT: first operand should be 'function_entry_count' |
| 27 | ; CHECK-NEXT: !2 = !{!"some_other_count", i64 200} |
| 28 | |
| 29 | define i32 @bad4() !prof !3 { |
| 30 | ret i32 0 |
| 31 | } |
| 32 | |
| 33 | !3 = !{!"function_entry_count", !"string"} |
| 34 | ; CHECK-NEXT: expected integer argument to function_entry_count |
| 35 | ; CHECK-NEXT: !3 = !{!"function_entry_count", !"string"} |