[PATCH] D88396: [X86] Replace movaps with movups when avx is enabled.
LuoYuanke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 01:50:37 PDT 2020
LuoYuanke added a comment.
In D88396#2297525 <https://reviews.llvm.org/D88396#2297525>, @lebedev.ri wrote:
> What issue is this fixing?
>
>> However if the address is not aligned, movaps raise exception while movups can still run.
>
> That sounds like either a miscompile happened along the way, or the original source code had UB to begin with.
It can avoid segment fault when unaligned pointer is casted.
#include <immintrin.h>
extern __m128 value;
void add(void* pointer) {
value = _mm_add_ps(value,*(__m128*)pointer);
}
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