summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC
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
commit59aa126e487f9a023d4cd90bb37c50787f0283fe (patch)
tree08df7c5260750324f57cda9eac958696fa385d38 /llvm/test/CodeGen/PowerPC
parentae84bbdbedb996b1e1aac8304f8f26f37a4a32de (diff)
downloadbcm5719-llvm-59aa126e487f9a023d4cd90bb37c50787f0283fe.tar.gz
bcm5719-llvm-59aa126e487f9a023d4cd90bb37c50787f0283fe.zip
After reading memory that's already freed.
llvm-svn: 49810
Diffstat (limited to 'llvm/test/CodeGen/PowerPC')
-rw-r--r--llvm/test/CodeGen/PowerPC/2008-04-16-CoalescerBug.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/2008-04-16-CoalescerBug.ll b/llvm/test/CodeGen/PowerPC/2008-04-16-CoalescerBug.ll
new file mode 100644
index 00000000000..357ab100d2d
--- /dev/null
+++ b/llvm/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
+}
OpenPOWER on IntegriCloud