This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81389] _mm_cmpestri segfault on -O0
- From: "rockeet at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 09 Aug 2017 04:08:33 +0000
- Subject: [Bug target/81389] _mm_cmpestri segfault on -O0
- Auto-submitted: auto-generated
- References: <bug-81389-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81389
rockeet <rockeet at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |---
--- Comment #7 from rockeet <rockeet at gmail dot com> ---
@Marc @Jakub @Martin
Intel CPU document says: operand of _mm_cmpestri can be memory or mm register,
when the operand is memory, it does not require alignment.
The issue is: GCC does not know this knowledge(memory operand need not memory
align), and there is no way to enforce gcc to generate a _mm_cmpestri which
always use memory operand, not mm register.
If I manually load the unaligned memory into an aligned `__m128i`, it has
performance penalty on optimizing compilation.
At last, we can always use `asm` to workaround this issue, but this is not the
ideal solution!