summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-08-02 23:32:53 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-08-02 23:32:53 +0000
commit4babac89cc8a714ed9928ddf8603cf5db982b42f (patch)
tree8207b0a0503219c5e9c4eb67e86b308ccc3a41f1 /llvm/test
parent5629ec141f727445b2a7c6a91cbcfb8eeeecd757 (diff)
downloadbcm5719-llvm-4babac89cc8a714ed9928ddf8603cf5db982b42f.tar.gz
bcm5719-llvm-4babac89cc8a714ed9928ddf8603cf5db982b42f.zip
[Verifier] Add more tests related to non-integral pointers
As suggested by Matt Arsenault in post-commit review. llvm-svn: 277550
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Verifier/non-integral-pointers.ll17
1 files changed, 16 insertions, 1 deletions
diff --git a/llvm/test/Verifier/non-integral-pointers.ll b/llvm/test/Verifier/non-integral-pointers.ll
index 4853c6cd921..b0be282007e 100644
--- a/llvm/test/Verifier/non-integral-pointers.ll
+++ b/llvm/test/Verifier/non-integral-pointers.ll
@@ -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))
}
+
+@cycle_0 = addrspace(4) constant i64 ptrtoint (i64 addrspace(4)* addrspace(4)* @cycle_1 to i64)
+@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
+}
+
+@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
+}
OpenPOWER on IntegriCloud