[PATCH] D88396: [X86] Replace movaps with movups when avx is enabled.

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 00:31:48 PDT 2020


LuoYuanke added a comment.

I didn't get the error at https://godbolt.org/z/8aGhd5. Another example may like this, an float array is packed in a struct.

  #include <immintrin.h>
  
  __m128 value;
  
  typedef struct _data_str {
      int header;
      float src[400];
  } data_t;
  
  data_t data;
  
  void add(__m128* pointer) {
      value = _mm_add_ps(value, *pointer);
  }
  
  void foo() {
      for (int i = 0; i < 400; i += 4)
      add((__m128*)(&data.src[i]));
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88396/new/

https://reviews.llvm.org/D88396



More information about the llvm-commits mailing list