[llvm-dev] Forcing llvm to not wrap two 32bit accesses into a single 64bit access

James Courtier-Dutton via llvm-dev llvm-dev at lists.llvm.org
Wed May 19 05:50:27 PDT 2021


I am working with a problem with an arm64 CPU that seems to have
problems with 64bit read/write operations to particular memory
If I wish to transfer 256 bytes to this region with:
uint8_t *src;
uint8_t *dest;
for (int n = 0; n < 256; n++) {
  src[n] = dest[n];

Now, these are byte accesses, but LLVM optimisation might try to
convert them into 64 bit or wide data transfer instructions.
How do I ensure that the optimisation will only optimise to 32bit wide

As it is only for specific memory regions, I don't wish to put the
restriction on the entire program.

Kind Regards


More information about the llvm-dev mailing list