| OLD | NEW |
| 1 ; RUN: pnacl-abicheck < %s | FileCheck %s | 1 ; RUN: not pnacl-abicheck < %s | FileCheck %s |
| 2 | 2 |
| 3 ; This tests that the arithmetic attributes "nuw" and "nsw" ("no | 3 ; This tests that the arithmetic attributes "nuw" and "nsw" ("no |
| 4 ; unsigned wrap" and "no signed wrap") and "exact" are disallowed by | 4 ; unsigned wrap" and "no signed wrap") and "exact" are disallowed by |
| 5 ; the PNaCl ABI verifier. | 5 ; the PNaCl ABI verifier. |
| 6 | 6 |
| 7 define internal void @allowed_cases() { | 7 define internal void @allowed_cases() { |
| 8 %add = add i32 1, 2 | 8 %add = add i32 1, 2 |
| 9 %shl = shl i32 3, 4 | 9 %shl = shl i32 3, 4 |
| 10 %udiv = udiv i32 4, 2 | 10 %udiv = udiv i32 4, 2 |
| 11 %lshr = lshr i32 2, 1 | 11 %lshr = lshr i32 2, 1 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 26 %lshr = lshr exact i32 2, 1 | 26 %lshr = lshr exact i32 2, 1 |
| 27 ; CHECK-NEXT: disallowed: has "exact" attribute: %lshr | 27 ; CHECK-NEXT: disallowed: has "exact" attribute: %lshr |
| 28 %ashr = ashr exact i32 2, 1 | 28 %ashr = ashr exact i32 2, 1 |
| 29 ; CHECK-NEXT: disallowed: has "exact" attribute: %ashr | 29 ; CHECK-NEXT: disallowed: has "exact" attribute: %ashr |
| 30 %udiv = udiv exact i32 4, 2 | 30 %udiv = udiv exact i32 4, 2 |
| 31 ; CHECK-NEXT: disallowed: has "exact" attribute: %udiv | 31 ; CHECK-NEXT: disallowed: has "exact" attribute: %udiv |
| 32 | 32 |
| 33 ret void | 33 ret void |
| 34 } | 34 } |
| 35 ; CHECK-NOT: disallowed | 35 ; CHECK-NOT: disallowed |
| OLD | NEW |