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

Unified Diff: test/Transforms/MinSFI/expand-allocas-globalvar-exists.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/MinSFI/expand-allocas.ll ('k') | test/Transforms/MinSFI/expand-allocas-no-start.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Transforms/MinSFI/expand-allocas-globalvar-exists.ll
diff --git a/test/Transforms/MinSFI/expand-allocas-globalvar-exists.ll b/test/Transforms/MinSFI/expand-allocas-globalvar-exists.ll
new file mode 100644
index 0000000000000000000000000000000000000000..eaa0f7502859abeaba213a0c94857af69b1ddcf2
--- /dev/null
+++ b/test/Transforms/MinSFI/expand-allocas-globalvar-exists.ll
@@ -0,0 +1,24 @@
+; RUN: opt %s -minsfi-expand-allocas -S | FileCheck %s
+
+target datalayout = "p:32:32:32"
+target triple = "le32-unknown-nacl"
+
+@__sfi_stack_ptr = external global i32
+
+; CHECK: @__sfi_stack_ptr1 = internal global i32
+
+define i8* @test_correct_global_var_used() {
+ %ptr = alloca i8
+ ret i8* %ptr
+}
+
+; CHECK-LABEL: define i8* @test_correct_global_var_used() {
+; CHECK-NEXT: %frame_top = load i32* @__sfi_stack_ptr1
+; CHECK-NEXT: %1 = sub i32 %frame_top, 1
+; CHECK-NEXT: %ptr = inttoptr i32 %1 to i8*
+; CHECK-NEXT: ret i8* %ptr
+; CHECK-NEXT: }
+
+define i32 @_start_minsfi(i32 %args) {
+ ret i32 0
+}
« no previous file with comments | « test/Transforms/MinSFI/expand-allocas.ll ('k') | test/Transforms/MinSFI/expand-allocas-no-start.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698