https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81941
Bug ID: 81941
Summary: Rejects intrinsic use
Product: gcc
Version: 7.2.1
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
CC: uros at gcc dot gnu.org
Target Milestone: ---
Target: i?86-*-*
#include <xmmintrin.h>
void __attribute__((target("fpmath=sse","sse"))) foo (float *x)
{
volatile __m128 y = _mm_loadu_ps (x);
}
is rejected as
> gcc-7 -S t.c -m32 -march=i586
In file included from t.c:1:0:
t.c: In function ‘foo’:
/usr/lib64/gcc/x86_64-suse-linux/7/include/xmmintrin.h:932:1: error: inlining
failed in call to always_inline ‘_mm_loadu_ps’: target specific option mismatch
_mm_loadu_ps (float const *__P)
^~~~~~~~~~~~
t.c:5:23: note: called from here
volatile __m128 y = _mm_loadu_ps (x);
^~~~~~~~~~~~~~~~
it works with target("fpmath=sse+387","sse"). I suppose the inlining check
should allow inlining if there's a common subset of fpmath rather than
an exact match only.