OLD | NEW |
1 ; Tests that we don't get fooled by a fake NaCl intrinsic. | 1 ; Tests that we don't get fooled by a fake NaCl intrinsic. |
2 | 2 |
3 | 3 ; TODO(kschimpf) Find way to run this through p2i. Note: Can't do this |
| 4 ; currently because run-llvm2ice.py raises exception on error, |
| 5 ; and output is lost. |
4 ; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \ | 6 ; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \ |
5 ; RUN: | not %llvm2ice -notranslate -verbose=inst -build-on-read \ | 7 ; RUN: | not %llvm2ice -notranslate -verbose=inst -build-on-read \ |
6 ; RUN: -allow-pnacl-reader-error-recovery \ | 8 ; RUN: -allow-pnacl-reader-error-recovery \ |
7 ; RUN: -allow-local-symbol-tables \ | 9 ; RUN: -allow-local-symbol-tables \ |
8 ; RUN: | FileCheck %s | 10 ; RUN: | FileCheck %s |
9 | 11 |
10 declare i32 @llvm.fake.i32(i32) | 12 declare i32 @llvm.fake.i32(i32) |
11 | 13 |
12 define i32 @testFake(i32 %v) { | 14 define i32 @testFake(i32 %v) { |
13 %r = call i32 @llvm.fake.i32(i32 %v) | 15 %r = call i32 @llvm.fake.i32(i32 %v) |
14 ret i32 %r | 16 ret i32 %r |
15 } | 17 } |
16 | 18 |
17 ; CHECK: Error: (218:6) Invalid PNaCl intrinsic call to llvm.fake.i32 | 19 ; CHECK: Error: (218:6) Invalid PNaCl intrinsic call to llvm.fake.i32 |
18 | 20 |
OLD | NEW |