summaryrefslogtreecommitdiff
path: root/test/Transforms/GlobalOpt
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-05 17:20:46 +0000
committerChris Lattner <sabre@nondot.org>2010-09-05 17:20:46 +0000
commite971131695ac41afd56e82facddccc2807aa9bbd (patch)
tree226873288a4169121751862a2497a0ca2614cb16 /test/Transforms/GlobalOpt
parentb76d20969f987cf18285bf8439d00444ce5aa6fb (diff)
downloadllvm-e971131695ac41afd56e82facddccc2807aa9bbd.tar.gz
llvm-e971131695ac41afd56e82facddccc2807aa9bbd.tar.bz2
llvm-e971131695ac41afd56e82facddccc2807aa9bbd.tar.xz
fix PR8063, a crash in globalopt in the malloc analysis code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/GlobalOpt')
-rw-r--r--test/Transforms/GlobalOpt/crash.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/GlobalOpt/crash.ll b/test/Transforms/GlobalOpt/crash.ll
index 701472c059..bb1fc84f46 100644
--- a/test/Transforms/GlobalOpt/crash.ll
+++ b/test/Transforms/GlobalOpt/crash.ll
@@ -40,3 +40,18 @@ xx:
}
declare noalias i8* @malloc(i64) nounwind
+
+
+; PR8063
+@permute_bitrev.bitrev = internal global i32* null, align 8
+define void @permute_bitrev() nounwind {
+entry:
+ %tmp = load i32** @permute_bitrev.bitrev, align 8
+ %conv = sext i32 0 to i64
+ %mul = mul i64 %conv, 4
+ %call = call i8* @malloc(i64 %mul)
+ %0 = bitcast i8* %call to i32*
+ store i32* %0, i32** @permute_bitrev.bitrev, align 8
+ ret void
+}
+