[Verifier] Improve test coverage for rL277413
authorSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 2 Aug 2016 03:23:22 +0000 (03:23 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 2 Aug 2016 03:23:22 +0000 (03:23 +0000)
As suggest via post-commit review.

llvm-svn: 277414

llvm/test/Verifier/non-integral-pointers.ll

index 02eda34..4853c6c 100644 (file)
@@ -55,3 +55,15 @@ define i64 @f_8() {
 ; CHECK: ptrtoint not supported for non-integral pointers
   ret i64 ptrtoint (i8 addrspace(4)* @global0 to i64)
 }
+
+define i8 addrspace(4)* @f_9() {
+; CHECK: inttoptr not supported for non-integral pointers
+  ret i8 addrspace(4)* getelementptr (i8, i8 addrspace(4)* inttoptr (i64 55 to i8 addrspace(4)*), i32 100)
+}
+
+@global1 = addrspace(4) constant i8 42
+
+define i8 addrspace(4)* @f_10(i64 %rhs) {
+; CHECK: ptrtoint not supported for non-integral pointers
+  ret i8 addrspace(4)* getelementptr (i8, i8 addrspace(4)* @global0, i64 ptrtoint (i8 addrspace(4)* @global1 to i64))
+}