Add a test case for r278217 "[LVI] Relax the assertion about LVILatticeVal type in...
authorArtur Pilipenko <apilipenko@azulsystems.com>
Wed, 10 Aug 2016 13:51:01 +0000 (13:51 +0000)
committerArtur Pilipenko <apilipenko@azulsystems.com>
Wed, 10 Aug 2016 13:51:01 +0000 (13:51 +0000)
llvm-svn: 278226

llvm/test/Transforms/CorrelatedValuePropagation/add.ll

index 9f3f99b..f91d0e3 100644 (file)
@@ -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
+}