[llvm-dev] [RFC] arm64_32: upstreaming ILP32 support for AArch64

Matt Arsenault via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 1 13:21:31 PST 2019

> On Feb 1, 2019, at 3:57 PM, Tim Northover <t.p.northover at gmail.com> wrote:
> The main non-integer pointer project I'm aware of is CHERI, and for
> personal reasons I'm all in favour of making its job easier. Do you
> have others in mind, or any other opinions in how a target should
> override GEP generation? If some particular variety of arm64_32
> upstreaming could provide a stepping stone for other uses that would
> be a definite argument in its favour.

AMDGPU basically has 128-bit fat pointers for lots of intrinsics. We currently hack around this by using <4 x i32>, which isn’t really valid since LLVM assumes memory access is through a pointer type. We would like to have 128-bit fat pointers, but only the low 48-bits really behave as an integer. We want to do 64-bit adds on the low bits, and preserve the high metadata bits.

I haven’t looked too closely at how to actually implement this, but some form of target control of GEP lowering is definitely needed for this. I imagine this looks something like a ptr_add instruction, and most of the GEP complexity is turned into a simple byte offset from this.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190201/5d4a5529/attachment.html>

More information about the llvm-dev mailing list