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

Unified Diff: test/Transforms/NaCl/expand-tls-constexpr-alias.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/expand-tls-constexpr.ll ('k') | test/Transforms/NaCl/expand-tls-constexpr2.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Transforms/NaCl/expand-tls-constexpr-alias.ll
diff --git a/test/Transforms/NaCl/expand-tls-constexpr-alias.ll b/test/Transforms/NaCl/expand-tls-constexpr-alias.ll
new file mode 100644
index 0000000000000000000000000000000000000000..65daa5eacd4ab3ce6e3fe6e3125761dc6dd3a043
--- /dev/null
+++ b/test/Transforms/NaCl/expand-tls-constexpr-alias.ll
@@ -0,0 +1,28 @@
+; RUN: opt < %s -nacl-expand-tls-constant-expr -S | FileCheck %s
+
+@real_tvar = thread_local global i32 123
+@tvar_alias = alias i32* @real_tvar
+@tvar_alias2 = alias i32* getelementptr (i32* @real_tvar, i32 100)
+
+
+define i32* @get_tvar() {
+ ret i32* @tvar_alias
+}
+; CHECK: define i32* @get_tvar()
+; CHECK: ret i32* @real_tvar
+
+
+define i32* @get_tvar2() {
+ ret i32* @tvar_alias2
+}
+; CHECK: define i32* @get_tvar2()
+; CHECK: %expanded = getelementptr i32* @real_tvar, i32 100
+; CHECK: ret i32* %expanded
+
+
+define i32* @get_tvar3() {
+ ret i32* getelementptr (i32* @tvar_alias2, i32 100)
+}
+; CHECK: define i32* @get_tvar3()
+; CHECK: %expanded = getelementptr i32* @real_tvar, i32 200
+; CHECK: ret i32* %expanded
« no previous file with comments | « test/Transforms/NaCl/expand-tls-constexpr.ll ('k') | test/Transforms/NaCl/expand-tls-constexpr2.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698