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

Unified Diff: test/Transforms/NaCl/rewrite-call-with-libfunc-argument.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/Transforms/NaCl/resolve-pnacl-intrinsics.ll ('k') | test/Transforms/NaCl/rewrite-flt-rounds.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Transforms/NaCl/rewrite-call-with-libfunc-argument.ll
diff --git a/test/Transforms/NaCl/rewrite-call-with-libfunc-argument.ll b/test/Transforms/NaCl/rewrite-call-with-libfunc-argument.ll
new file mode 100644
index 0000000000000000000000000000000000000000..56ee2d2c078e2ece071a5fe08fc6dd02f0dc92a8
--- /dev/null
+++ b/test/Transforms/NaCl/rewrite-call-with-libfunc-argument.ll
@@ -0,0 +1,18 @@
+; RUN: opt < %s -rewrite-pnacl-library-calls -S | FileCheck %s
+
+; See https://code.google.com/p/nativeclient/issues/detail?id=3706
+; Make sure that when @longjmp is used as an argument in a call instruction,
+; the rewrite pass does the right thing and doesn't get confused.
+
+; CHECK: define internal void @longjmp(i64* %env, i32 %val) {
+
+declare void @longjmp(i64*, i32)
+
+declare void @somefunc(i32, void (i64*, i32)*, i32)
+
+define void @foo() {
+entry:
+ call void @somefunc(i32 1, void (i64*, i32)* @longjmp, i32 2)
+; CHECK: call void @somefunc(i32 1, void (i64*, i32)* @longjmp, i32 2)
+ ret void
+}
« no previous file with comments | « test/Transforms/NaCl/resolve-pnacl-intrinsics.ll ('k') | test/Transforms/NaCl/rewrite-flt-rounds.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698