diff mbox

[BZ,#18740] Fix for SSE vector math tests run on non SSE4.1 machines

Message ID CAMXFM3sbouz_pPew6CdcvqJztEQ_eNTWG+dq+rJGESYdOS_VgQ@mail.gmail.com
State New
Headers show

Commit Message

Andrew Senkevich July 30, 2015, 2:51 p.m. UTC
2015-07-30 17:42 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
> On Thu, Jul 30, 2015 at 7:27 AM, Andrew Senkevich
> <andrew.n.senkevich@gmail.com> wrote:
>> Hi,
>>
>> we can build SSE vector math tests with -msse2 because ifunc in vector
>> function itself selects SSE2 or SSE4 implementation to test.
>>
>> 2015-07-30  Andrew Senkevich  <andrew.senkevich@intel.com>
>>
>>         [BZ #18740]
>>         * sysdeps/x86_64/fpu/Makefile (double-vlen2-arch-ext-cflags,
>>         float-vlen4-arch-ext-cflags): Use -msee2 instead of -msse4.
>>
>> diff --git a/ChangeLog b/ChangeLog
>> index bcb14cf..b5c21b5 100644
>> --- a/ChangeLog
>> +++ b/ChangeLog
>> @@ -1,3 +1,9 @@
>> +2015-07-30  Andrew Senkevich  <andrew.senkevich@intel.com>
>> +
>> +       [BZ #18740]
>> +       * sysdeps/x86_64/fpu/Makefile (double-vlen2-arch-ext-cflags,
>> +       float-vlen4-arch-ext-cflags): Use -msee2 instead of -msse4.
>> +
>>  2015-07-30  Mike Frysinger  <vapier@gentoo.org>
>>
>>         * sysdeps/hppa/nptl/bits/pthreadtypes.h (pthread_mutex_t): Change
>> diff --git a/sysdeps/x86_64/fpu/Makefile b/sysdeps/x86_64/fpu/Makefile
>> index e270b8a..28802dd 100644
>> --- a/sysdeps/x86_64/fpu/Makefile
>> +++ b/sysdeps/x86_64/fpu/Makefile
>> @@ -33,12 +33,12 @@ ifeq (yes,$(config-cflags-avx512))
>>  libmvec-tests += double-vlen8 float-vlen16
>>  endif
>>
>> -double-vlen2-arch-ext-cflags = -msse4
>> +double-vlen2-arch-ext-cflags = -msse2
>>  double-vlen4-arch-ext-cflags = -mavx
>>  double-vlen4-arch-ext2-cflags = -mavx2
>>  double-vlen8-arch-ext-cflags = -mavx512f
>>
>> -float-vlen4-arch-ext-cflags = -msse4
>> +float-vlen4-arch-ext-cflags = -msse2
>>  float-vlen8-arch-ext-cflags = -mavx
>>  float-vlen8-arch-ext2-cflags = -mavx2
>>  float-vlen16-arch-ext-cflags = -mavx512f
>>
>
> SSE2 is the default for x86-64.  Please just remove the line.

Here is updated patch.



--
WBR,
Andrew

Comments

H.J. Lu July 30, 2015, 2:53 p.m. UTC | #1
On Thu, Jul 30, 2015 at 7:51 AM, Andrew Senkevich
<andrew.n.senkevich@gmail.com> wrote:
> 2015-07-30 17:42 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
>> On Thu, Jul 30, 2015 at 7:27 AM, Andrew Senkevich
>> <andrew.n.senkevich@gmail.com> wrote:
>>> Hi,
>>>
>>> we can build SSE vector math tests with -msse2 because ifunc in vector
>>> function itself selects SSE2 or SSE4 implementation to test.
>>>
>>> 2015-07-30  Andrew Senkevich  <andrew.senkevich@intel.com>
>>>
>>>         [BZ #18740]
>>>         * sysdeps/x86_64/fpu/Makefile (double-vlen2-arch-ext-cflags,
>>>         float-vlen4-arch-ext-cflags): Use -msee2 instead of -msse4.
>>>
>>> diff --git a/ChangeLog b/ChangeLog
>>> index bcb14cf..b5c21b5 100644
>>> --- a/ChangeLog
>>> +++ b/ChangeLog
>>> @@ -1,3 +1,9 @@
>>> +2015-07-30  Andrew Senkevich  <andrew.senkevich@intel.com>
>>> +
>>> +       [BZ #18740]
>>> +       * sysdeps/x86_64/fpu/Makefile (double-vlen2-arch-ext-cflags,
>>> +       float-vlen4-arch-ext-cflags): Use -msee2 instead of -msse4.
>>> +
>>>  2015-07-30  Mike Frysinger  <vapier@gentoo.org>
>>>
>>>         * sysdeps/hppa/nptl/bits/pthreadtypes.h (pthread_mutex_t): Change
>>> diff --git a/sysdeps/x86_64/fpu/Makefile b/sysdeps/x86_64/fpu/Makefile
>>> index e270b8a..28802dd 100644
>>> --- a/sysdeps/x86_64/fpu/Makefile
>>> +++ b/sysdeps/x86_64/fpu/Makefile
>>> @@ -33,12 +33,12 @@ ifeq (yes,$(config-cflags-avx512))
>>>  libmvec-tests += double-vlen8 float-vlen16
>>>  endif
>>>
>>> -double-vlen2-arch-ext-cflags = -msse4
>>> +double-vlen2-arch-ext-cflags = -msse2
>>>  double-vlen4-arch-ext-cflags = -mavx
>>>  double-vlen4-arch-ext2-cflags = -mavx2
>>>  double-vlen8-arch-ext-cflags = -mavx512f
>>>
>>> -float-vlen4-arch-ext-cflags = -msse4
>>> +float-vlen4-arch-ext-cflags = -msse2
>>>  float-vlen8-arch-ext-cflags = -mavx
>>>  float-vlen8-arch-ext2-cflags = -mavx2
>>>  float-vlen16-arch-ext-cflags = -mavx512f
>>>
>>
>> SSE2 is the default for x86-64.  Please just remove the line.
>
> Here is updated patch.
>
> diff --git a/ChangeLog b/ChangeLog
> index bcb14cf..b4321fa 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,11 @@
> +2015-07-30  Andrew Senkevich  <andrew.senkevich@intel.com>
> +
> +       [BZ #18740]
> +       * sysdeps/x86_64/fpu/Makefile (double-vlen2-arch-ext-cflags,
> +       float-vlen4-arch-ext-cflags): Removed.
> +       * math/Makefile (CFLAGS-test-double-vlen2-wrappers.c,
> +       CFLAGS-test-float-vlen4-wrappers.c): Likewise.
> +
>  2015-07-30  Mike Frysinger  <vapier@gentoo.org>

OK.

Thanks.
diff mbox

Patch

diff --git a/ChangeLog b/ChangeLog
index bcb14cf..b4321fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@ 
+2015-07-30  Andrew Senkevich  <andrew.senkevich@intel.com>
+
+       [BZ #18740]
+       * sysdeps/x86_64/fpu/Makefile (double-vlen2-arch-ext-cflags,
+       float-vlen4-arch-ext-cflags): Removed.
+       * math/Makefile (CFLAGS-test-double-vlen2-wrappers.c,
+       CFLAGS-test-float-vlen4-wrappers.c): Likewise.
+
 2015-07-30  Mike Frysinger  <vapier@gentoo.org>

        * sysdeps/hppa/nptl/bits/pthreadtypes.h (pthread_mutex_t): Change
diff --git a/math/Makefile b/math/Makefile
index 2c78dd0..6388bae 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -151,7 +151,6 @@  libm-test-vec-cflags =
$(libm-test-fast-math-cflags) -fno-inline \
                       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas

 CFLAGS-test-double-vlen2.c = $(libm-test-vec-cflags)
-CFLAGS-test-double-vlen2-wrappers.c = $(double-vlen2-arch-ext-cflags)

 CFLAGS-test-double-vlen4.c = $(libm-test-vec-cflags)
 CFLAGS-test-double-vlen4-wrappers.c = $(double-vlen4-arch-ext-cflags)
@@ -160,7 +159,6 @@  CFLAGS-test-double-vlen8.c = $(libm-test-vec-cflags)
 CFLAGS-test-double-vlen8-wrappers.c = $(double-vlen8-arch-ext-cflags)

 CFLAGS-test-float-vlen4.c = $(libm-test-vec-cflags)
-CFLAGS-test-float-vlen4-wrappers.c = $(float-vlen4-arch-ext-cflags)

 CFLAGS-test-float-vlen8.c = $(libm-test-vec-cflags)
 CFLAGS-test-float-vlen8-wrappers.c = $(float-vlen8-arch-ext-cflags)
diff --git a/sysdeps/x86_64/fpu/Makefile b/sysdeps/x86_64/fpu/Makefile
index e270b8a..1ebe511 100644
--- a/sysdeps/x86_64/fpu/Makefile
+++ b/sysdeps/x86_64/fpu/Makefile
@@ -33,12 +33,10 @@  ifeq (yes,$(config-cflags-avx512))
 libmvec-tests += double-vlen8 float-vlen16
 endif

-double-vlen2-arch-ext-cflags = -msse4
 double-vlen4-arch-ext-cflags = -mavx
 double-vlen4-arch-ext2-cflags = -mavx2
 double-vlen8-arch-ext-cflags = -mavx512f

-float-vlen4-arch-ext-cflags = -msse4
 float-vlen8-arch-ext-cflags = -mavx
 float-vlen8-arch-ext2-cflags = -mavx2
 float-vlen16-arch-ext-cflags = -mavx512f