diff options
author | Chris Lattner <sabre@nondot.org> | 2011-05-22 07:15:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-05-22 07:15:13 +0000 |
commit | 98a42b2fc39f3fc46905fb98078cce4ce4e0a827 (patch) | |
tree | 3f1d8c200430e0b4c16dce01d87ed75ddf82d4f2 /test/Transforms | |
parent | 9e7bc05ad7fb69a25aff37e348942b07eed9cd73 (diff) | |
download | external_llvm-98a42b2fc39f3fc46905fb98078cce4ce4e0a827.zip external_llvm-98a42b2fc39f3fc46905fb98078cce4ce4e0a827.tar.gz external_llvm-98a42b2fc39f3fc46905fb98078cce4ce4e0a827.tar.bz2 |
fix PR9856, an incorrectly conservative assertion: a global can be
"stored once" even if its address is compared.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131849 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/GlobalOpt/crash.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/GlobalOpt/crash.ll b/test/Transforms/GlobalOpt/crash.ll index 9da5a5e..366a874 100644 --- a/test/Transforms/GlobalOpt/crash.ll +++ b/test/Transforms/GlobalOpt/crash.ll @@ -64,3 +64,17 @@ define void @memset_with_strange_user() ssp { ret void } declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind + + +; PR9856 +@g_52 = internal global i32** null, align 8 +@g_90 = external global i32*, align 8 + +define void @icmp_user_of_stored_once() nounwind ssp { +entry: + %tmp4 = load i32*** @g_52, align 8 + store i32** @g_90, i32*** @g_52 + %cmp17 = icmp ne i32*** undef, @g_52 + ret void +} + |