summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/StackColoring.ll
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-09-10 12:39:35 +0000
committerNadav Rotem <nrotem@apple.com>2012-09-10 12:39:35 +0000
commite47feeb823ebf496e82db6a666d4c0fbaeb158b4 (patch)
tree3f21995ebef5c3b04c895d850743b05cd08c06a1 /test/CodeGen/X86/StackColoring.ll
parent8100d244ff1e29c5e4cc864152c2e210dc6c4275 (diff)
downloadllvm-e47feeb823ebf496e82db6a666d4c0fbaeb158b4.tar.gz
llvm-e47feeb823ebf496e82db6a666d4c0fbaeb158b4.tar.bz2
llvm-e47feeb823ebf496e82db6a666d4c0fbaeb158b4.tar.xz
Stack Coloring: Add support for multiple regions of the same slot, within a single basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/StackColoring.ll')
-rw-r--r--test/CodeGen/X86/StackColoring.ll28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CodeGen/X86/StackColoring.ll b/test/CodeGen/X86/StackColoring.ll
index 42235a03e3..6ef3b3cd02 100644
--- a/test/CodeGen/X86/StackColoring.ll
+++ b/test/CodeGen/X86/StackColoring.ll
@@ -297,6 +297,34 @@ bb3:
ret i32 0
}
+
+;YESCOLOR: multi_region_bb
+;NOCOLOR: multi_region_bb
+define void @multi_region_bb() nounwind ssp {
+entry:
+ %A.i1 = alloca [100 x i32], align 4
+ %B.i2 = alloca [100 x i32], align 4
+ %A.i = alloca [100 x i32], align 4
+ %B.i = alloca [100 x i32], align 4
+ %0 = bitcast [100 x i32]* %A.i to i8*
+ call void @llvm.lifetime.start(i64 -1, i8* %0) nounwind ; <---- start #1
+ %1 = bitcast [100 x i32]* %B.i to i8*
+ call void @llvm.lifetime.start(i64 -1, i8* %1) nounwind
+ call void @bar([100 x i32]* %A.i, [100 x i32]* %B.i) nounwind
+ call void @llvm.lifetime.end(i64 -1, i8* %0) nounwind
+ call void @llvm.lifetime.end(i64 -1, i8* %1) nounwind
+ %2 = bitcast [100 x i32]* %A.i1 to i8*
+ call void @llvm.lifetime.start(i64 -1, i8* %2) nounwind
+ %3 = bitcast [100 x i32]* %B.i2 to i8*
+ call void @llvm.lifetime.start(i64 -1, i8* %3) nounwind
+ call void @llvm.lifetime.start(i64 -1, i8* %0) nounwind ; <---- start #2
+ call void @bar([100 x i32]* %A.i1, [100 x i32]* %B.i2) nounwind
+ call void @llvm.lifetime.end(i64 -1, i8* %2) nounwind
+ call void @llvm.lifetime.end(i64 -1, i8* %0) nounwind
+ call void @llvm.lifetime.end(i64 -1, i8* %3) nounwind
+ ret void
+}
+
declare void @bar([100 x i32]* , [100 x i32]*) nounwind
declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind