summaryrefslogtreecommitdiffstats
path: root/llvm/test/Regression/Analysis/DSGraph/SCCSimpleExample.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Regression/Analysis/DSGraph/SCCSimpleExample.ll')
-rw-r--r--llvm/test/Regression/Analysis/DSGraph/SCCSimpleExample.ll25
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/Regression/Analysis/DSGraph/SCCSimpleExample.ll b/llvm/test/Regression/Analysis/DSGraph/SCCSimpleExample.ll
new file mode 100644
index 00000000000..3c71c3461c3
--- /dev/null
+++ b/llvm/test/Regression/Analysis/DSGraph/SCCSimpleExample.ll
@@ -0,0 +1,25 @@
+
+; RUN: analyze %s -datastructure-gc --dsgc-abort-if-merged=Y,BVal
+
+implementation
+
+internal void %F1(int* %X) {
+ %Y = alloca int
+ store int 4, int* %Y
+ %BVal = call int* %F2(int* %Y)
+ ret void
+}
+
+internal int* %F2(int* %A) {
+ %B = malloc int
+ store int 4, int* %B
+ call void %F1(int* %B)
+ ret int* %B
+}
+
+int %main() {
+ %Q = malloc int
+ store int 4, int* %Q
+ call void %F1(int* %Q)
+ ret int 0
+}
OpenPOWER on IntegriCloud