1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Verifier/dereferenceable-md-inttoptr.ll
Ryan Taylor d817c75cad [IR][Verifier] Allow IntToPtrInst to be !dereferenceable
Summary:
Allow IntToPtrInst to carry !dereferenceable metadata tag.
This is valid since !dereferenceable can be only be applied to
pointer type values.

Change-Id: If8a6e3c616f073d51eaff52ab74535c29ed497b4

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64954

llvm-svn: 366826
2019-07-23 17:19:56 +00:00

7 lines
147 B
LLVM

; RUN: llvm-as < %s -o /dev/null
define i8* @f_0(i8 %val) {
%ptr = inttoptr i8 %val to i8*, !dereferenceable_or_null !{i64 2}
ret i8* %ptr
}