[llvm] r277550 - [Verifier] Add more tests related to non-integral pointers

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 16:32:53 PDT 2016


Author: sanjoy
Date: Tue Aug  2 18:32:53 2016
New Revision: 277550

URL: http://llvm.org/viewvc/llvm-project?rev=277550&view=rev
Log:
[Verifier] Add more tests related to non-integral pointers

As suggested by Matt Arsenault in post-commit review.

Modified:
    llvm/trunk/test/Verifier/non-integral-pointers.ll

Modified: llvm/trunk/test/Verifier/non-integral-pointers.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/non-integral-pointers.ll?rev=277550&r1=277549&r2=277550&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/non-integral-pointers.ll (original)
+++ llvm/trunk/test/Verifier/non-integral-pointers.ll Tue Aug  2 18:32:53 2016
@@ -63,7 +63,22 @@ define i8 addrspace(4)* @f_9() {
 
 @global1 = addrspace(4) constant i8 42
 
-define i8 addrspace(4)* @f_10(i64 %rhs) {
+define i8 addrspace(4)* @f_10() {
 ; 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))
 }
+
+ at cycle_0 = addrspace(4) constant i64 ptrtoint (i64 addrspace(4)* addrspace(4)* @cycle_1 to i64)
+ at cycle_1 = addrspace(4) constant i64 addrspace(4) * @cycle_0
+
+define i64 addrspace(4)* addrspace(4)* @f_11() {
+; CHECK: ptrtoint not supported for non-integral pointers
+  ret i64 addrspace(4)* addrspace(4)* @cycle_1
+}
+
+ at cycle_self = addrspace(4) constant i64 ptrtoint (i64 addrspace(4)* @cycle_self to i64)
+
+define i64 addrspace(4)* @f_12() {
+; CHECK: ptrtoint not supported for non-integral pointers
+  ret i64 addrspace(4)* @cycle_self
+}




More information about the llvm-commits mailing list