[PATCH] [AArch64 NEON] Add patterns for loading vector constant from constant poll.
t.p.northover at gmail.com
Thu Dec 12 02:42:48 PST 2013
A single ADR is incorrect. The constants are in a separate section, which means they might be up to 4GB away from the code executing. It's no coincidence that this is precisely the distance an ADRP/ADD pair is capable of addressing (ADR can only do 2MB, I think).
That said, there's no particular reason for these to be NEON loads. On little-endian machines "ldr qD, [xN, :lo12:whatever]" (or "dD") does the same thing, and on big-endian machines (if anyone ever cares enough) we can change the constpool entry so that it still works. That's probably the most efficient way to handle it.
More information about the llvm-commits