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

Unified Diff: test/Transforms/NaCl/rewrite-longjmp-noncall-uses.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/rewrite-longjmp-no-store.ll ('k') | test/Transforms/NaCl/rewrite-memfuncs-no-store.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Transforms/NaCl/rewrite-longjmp-noncall-uses.ll
diff --git a/test/Transforms/NaCl/rewrite-longjmp-noncall-uses.ll b/test/Transforms/NaCl/rewrite-longjmp-noncall-uses.ll
new file mode 100644
index 0000000000000000000000000000000000000000..ed7818ec96881eaf068bb22a4d3552da1e87e0de
--- /dev/null
+++ b/test/Transforms/NaCl/rewrite-longjmp-noncall-uses.ll
@@ -0,0 +1,21 @@
+; RUN: opt < %s -rewrite-pnacl-library-calls -S | FileCheck %s
+; Check that the rewrite pass behaves correctly in the presence
+; of various uses of longjmp that are not calls.
+
+@fp = global void (i64*, i32)* @longjmp, align 8
+; CHECK: @fp = global void (i64*, i32)* @longjmp, align 8
+@arrfp = global [3 x void (i64*, i32)*] [void (i64*, i32)* null, void (i64*, i32)* @longjmp, void (i64*, i32)* null], align 16
+; CHECK: @arrfp = global [3 x void (i64*, i32)*] [void (i64*, i32)* null, void (i64*, i32)* @longjmp, void (i64*, i32)* null], align 16
+
+; CHECK: define internal void @longjmp(i64* %env, i32 %val) {
+
+declare void @longjmp(i64*, i32)
+
+declare void @somefunc(i8*)
+
+define void @foo() {
+entry:
+ call void @somefunc(i8* bitcast (void (i64*, i32)* @longjmp to i8*))
+; CHECK: call void @somefunc(i8* bitcast (void (i64*, i32)* @longjmp to i8*))
+ ret void
+}
« no previous file with comments | « test/Transforms/NaCl/rewrite-longjmp-no-store.ll ('k') | test/Transforms/NaCl/rewrite-memfuncs-no-store.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698