summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/2008-04-16-CoalescerBug.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-04-16 20:24:25 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-04-16 20:24:25 +0000
commit9c1e06e18721206c736512f3448997b41145019c (patch)
treedb3bdec896cb1afeb074fbd86c21422f51f9d88d /test/CodeGen/PowerPC/2008-04-16-CoalescerBug.ll
parent52e724ad7e679ee590f4bd763d55280586a8f1bc (diff)
downloadllvm-9c1e06e18721206c736512f3448997b41145019c.tar.gz
llvm-9c1e06e18721206c736512f3448997b41145019c.tar.bz2
llvm-9c1e06e18721206c736512f3448997b41145019c.tar.xz
After reading memory that's already freed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49810 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/2008-04-16-CoalescerBug.ll')
-rw-r--r--test/CodeGen/PowerPC/2008-04-16-CoalescerBug.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/2008-04-16-CoalescerBug.ll b/test/CodeGen/PowerPC/2008-04-16-CoalescerBug.ll
new file mode 100644
index 0000000000..357ab100d2
--- /dev/null
+++ b/test/CodeGen/PowerPC/2008-04-16-CoalescerBug.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | llc -mtriple=powerpc-apple-darwin
+; Avoid reading memory that's already freed.
+
+@llvm.used = appending global [1 x i8*] [ i8* bitcast (i32 (i64)* @_Z13GetSectorSizey to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0]
+
+define i32 @_Z13GetSectorSizey(i64 %Base) nounwind {
+entry:
+ br i1 false, label %bb, label %UnifiedReturnBlock
+bb: ; preds = %entry
+ %tmp10 = and i64 0, %Base ; <i64> [#uses=0]
+ ret i32 0
+UnifiedReturnBlock: ; preds = %entry
+ ret i32 131072
+}