[llvm] r278226 - Add a test case for r278217 "[LVI] Relax the assertion about LVILatticeVal type in getConstantRange"

Artur Pilipenko via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 06:51:01 PDT 2016


Author: apilipenko
Date: Wed Aug 10 08:51:01 2016
New Revision: 278226

URL: http://llvm.org/viewvc/llvm-project?rev=278226&view=rev
Log:
Add a test case for r278217 "[LVI] Relax the assertion about LVILatticeVal type in getConstantRange"

Modified:
    llvm/trunk/test/Transforms/CorrelatedValuePropagation/add.ll

Modified: llvm/trunk/test/Transforms/CorrelatedValuePropagation/add.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/CorrelatedValuePropagation/add.ll?rev=278226&r1=278225&r2=278226&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/CorrelatedValuePropagation/add.ll (original)
+++ llvm/trunk/test/Transforms/CorrelatedValuePropagation/add.ll Wed Aug 10 08:51:01 2016
@@ -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.
+ at b = global i32 0, align 4
+define void @test6(i32 %a) {
+bb:
+  %add = add i32 %a, ptrtoint (i32* @b to i32)
+  ret void
+}




More information about the llvm-commits mailing list