From: Artur Pilipenko Date: Wed, 10 Aug 2016 13:51:01 +0000 (+0000) Subject: Add a test case for r278217 "[LVI] Relax the assertion about LVILatticeVal type in... X-Git-Tag: llvmorg-4.0.0-rc1~12861 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e896325ca38a614ece15708dcc3ed9170c6e745d;p=platform%2Fupstream%2Fllvm.git Add a test case for r278217 "[LVI] Relax the assertion about LVILatticeVal type in getConstantRange" llvm-svn: 278226 --- diff --git a/llvm/test/Transforms/CorrelatedValuePropagation/add.ll b/llvm/test/Transforms/CorrelatedValuePropagation/add.ll index 9f3f99b..f91d0e3 100644 --- a/llvm/test/Transforms/CorrelatedValuePropagation/add.ll +++ b/llvm/test/Transforms/CorrelatedValuePropagation/add.ll @@ -89,3 +89,13 @@ bb: exit: ret void } + +; Check for a corner case where an integer value is represented with a constant +; LVILatticeValue instead of constantrange. Check that we don't fail with an +; assertion in this case. +@b = global i32 0, align 4 +define void @test6(i32 %a) { +bb: + %add = add i32 %a, ptrtoint (i32* @b to i32) + ret void +}