OLD | NEW |
1 ; RUN: pnacl-abicheck < %s | FileCheck %s | 1 ; RUN: not pnacl-abicheck < %s | FileCheck %s |
2 | 2 |
3 ; Most arithmetic operations are not very useful on i1, so use of i1 | 3 ; Most arithmetic operations are not very useful on i1, so use of i1 |
4 ; is restricted to a subset of operations. | 4 ; is restricted to a subset of operations. |
5 | 5 |
6 | 6 |
7 ; i1 is allowed on these bitwise operations because: | 7 ; i1 is allowed on these bitwise operations because: |
8 ; * These operations never overflow. | 8 ; * These operations never overflow. |
9 ; * They do get generated in practice for combining conditions. | 9 ; * They do get generated in practice for combining conditions. |
10 define internal void @allowed_cases() { | 10 define internal void @allowed_cases() { |
11 %and = and i1 0, 0 | 11 %and = and i1 0, 0 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 ; CHECK-NEXT: disallowed: alloca array size is not i32 | 57 ; CHECK-NEXT: disallowed: alloca array size is not i32 |
58 | 58 |
59 ; Switch on i1 is not useful. "br" should be used instead. | 59 ; Switch on i1 is not useful. "br" should be used instead. |
60 switch i1 0, label %next [i1 0, label %next] | 60 switch i1 0, label %next [i1 0, label %next] |
61 ; CHECK-NEXT: disallowed: switch on i1 | 61 ; CHECK-NEXT: disallowed: switch on i1 |
62 next: | 62 next: |
63 | 63 |
64 ret void | 64 ret void |
65 } | 65 } |
66 ; CHECK-NOT: disallowed | 66 ; CHECK-NOT: disallowed |
OLD | NEW |