Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(811)

Side by Side Diff: test/NaCl/PNaClABI/abi-arithmetic-attributes.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/NaCl/PNaClABI/abi-alignment.ll ('k') | test/NaCl/PNaClABI/abi-atomics.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; RUN: not pnacl-abicheck < %s | FileCheck %s
2
3 ; This tests that the arithmetic attributes "nuw" and "nsw" ("no
4 ; unsigned wrap" and "no signed wrap") and "exact" are disallowed by
5 ; the PNaCl ABI verifier.
6
7 define internal void @allowed_cases() {
8 %add = add i32 1, 2
9 %shl = shl i32 3, 4
10 %udiv = udiv i32 4, 2
11 %lshr = lshr i32 2, 1
12 %ashr = ashr i32 2, 1
13 ret void
14 }
15 ; CHECK-NOT: disallowed
16
17
18 define internal void @rejected_cases() {
19 %add = add nsw i32 1, 2
20 ; CHECK: disallowed: has "nsw" attribute: %add
21 %shl1 = shl nuw i32 3, 4
22 ; CHECK-NEXT: disallowed: has "nuw" attribute: %shl1
23 %sub = sub nsw nuw i32 5, 6
24 ; CHECK-NEXT: disallowed: has "nuw" attribute: %sub
25
26 %lshr = lshr exact i32 2, 1
27 ; CHECK-NEXT: disallowed: has "exact" attribute: %lshr
28 %ashr = ashr exact i32 2, 1
29 ; CHECK-NEXT: disallowed: has "exact" attribute: %ashr
30 %udiv = udiv exact i32 4, 2
31 ; CHECK-NEXT: disallowed: has "exact" attribute: %udiv
32
33 ret void
34 }
35 ; CHECK-NOT: disallowed
36
37
38 ; This stops the verifier from complaining about the lack of an entry point.
39 define void @_start(i32 %arg) {
40 ret void
41 }
OLDNEW
« no previous file with comments | « test/NaCl/PNaClABI/abi-alignment.ll ('k') | test/NaCl/PNaClABI/abi-atomics.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698