[PATCH] D46683: [X86] Assume alignment of movdir64b dst argument

Gabor Buella via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 10 12:07:46 PDT 2018


GBuella added a comment.

In https://reviews.llvm.org/D46683#1094662, @craig.topper wrote:

> What effect does this have?


Nothing important really, I just guessed it doesn't cost.
One contrived example I could come up with in 2 minutes:

  #include <x86intrin.h>
  
  void x(char *restrict a __attribute__((align_value(64))), char *restrict b, const char *c)
  {
          _movdir64b(b, c);
  
          for (int i = 0; i < 32; ++i)
                  a[i] = b[i];
  }

The silly memcpy loop above becomes 2 `movaps` instructions, instead of two `movups` instructions.


Repository:
  rC Clang

https://reviews.llvm.org/D46683





More information about the cfe-commits mailing list