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

Unified Diff: test/NaCl/Bitcode/pnacl-bcdis/intrinsics.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/NaCl/Bitcode/pnacl-bcdis/icmp.ll ('k') | test/NaCl/Bitcode/pnacl-bcdis/intrinsics-bad-types.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/NaCl/Bitcode/pnacl-bcdis/intrinsics.ll
diff --git a/test/NaCl/Bitcode/pnacl-bcdis/intrinsics.ll b/test/NaCl/Bitcode/pnacl-bcdis/intrinsics.ll
new file mode 100644
index 0000000000000000000000000000000000000000..46fafc64c257fac4ba5874535f8290de98c2da87
--- /dev/null
+++ b/test/NaCl/Bitcode/pnacl-bcdis/intrinsics.ll
@@ -0,0 +1,25 @@
+; Tests calls to intrinsics.
+
+; RUN: llvm-as < %s | pnacl-freeze | pnacl-bccompress --remove-abbreviations \
+; RUN: | pnacl-bcdis | FileCheck %s
+
+; Test simple intrinsic call.
+declare i8* @llvm.nacl.read.tp()
+
+define i32 @ReturnPtrIntrinsic() {
+ %1 = call i8* @llvm.nacl.read.tp()
+ %2 = ptrtoint i8* %1 to i32
+ ret i32 %2
+}
+
+; Test intrinsic call with i1 argument.
+declare external i32 @llvm.ctlz.i32(i32, i1)
+
+define i32 @f() {
+ %v0 = call i32 @llvm.ctlz.i32(i32 0, i1 0)
+ ret i32 %v0
+}
+
+; CHECK-NOT: Error
+
+
« no previous file with comments | « test/NaCl/Bitcode/pnacl-bcdis/icmp.ll ('k') | test/NaCl/Bitcode/pnacl-bcdis/intrinsics-bad-types.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698