diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-08-02 23:32:53 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-08-02 23:32:53 +0000 |
commit | f9a50810e2bdc954ddd08f016baa47405ae635ed (patch) | |
tree | 066736c6651a36cce46434bcf7416935620f6acd /test/Verifier | |
parent | d8ef8b0e483872cca02b0a353b38118b7fd1955f (diff) |
[Verifier] Add more tests related to non-integral pointers
As suggested by Matt Arsenault in post-commit review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277550 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Verifier')
-rw-r--r-- | test/Verifier/non-integral-pointers.ll | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/Verifier/non-integral-pointers.ll b/test/Verifier/non-integral-pointers.ll index 4853c6cd9213..b0be282007ef 100644 --- a/test/Verifier/non-integral-pointers.ll +++ b/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 +} |