From 2cc7d4feedd47b957f26bd758339572f99b2ec29 Mon Sep 17 00:00:00 2001 From: Steven Munroe Date: Sun, 11 Feb 2018 21:45:39 +0000 Subject: [PATCH] re PR target/84266 (mmintrin.h intrinsic headers for PowerPC code fails on power9) Fix PR 84266 From-SVN: r257571 --- gcc/ChangeLog | 8 ++++++++ gcc/config/rs6000/mmintrin.h | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc842d91c83..e9d794ec9aa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2018-02-11 Steven Munroe + + PR target/84266 + * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]): + Cast vec_cmpeq result to correct type. + * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]): + Cast vec_cmpgt result to correct type. + 2018-02-11 Alexandre Oliva * final.c (final_scan_insn_1): Renamed from... diff --git a/gcc/config/rs6000/mmintrin.h b/gcc/config/rs6000/mmintrin.h index 9001e570de5..6ae0e0007fe 100644 --- a/gcc/config/rs6000/mmintrin.h +++ b/gcc/config/rs6000/mmintrin.h @@ -854,7 +854,7 @@ _mm_cmpeq_pi32 (__m64 __m1, __m64 __m2) a = (__vector signed int)vec_splats (__m1); b = (__vector signed int)vec_splats (__m2); - c = (__vector signed short)vec_cmpeq (a, b); + c = (__vector signed int)vec_cmpeq (a, b); return (__builtin_unpack_vector_int128 ((__vector __int128_t)c, 0)); #else __m64_union m1, m2, res; @@ -883,7 +883,7 @@ _mm_cmpgt_pi32 (__m64 __m1, __m64 __m2) a = (__vector signed int)vec_splats (__m1); b = (__vector signed int)vec_splats (__m2); - c = (__vector signed short)vec_cmpgt (a, b); + c = (__vector signed int)vec_cmpgt (a, b); return (__builtin_unpack_vector_int128 ((__vector __int128_t)c, 0)); #else __m64_union m1, m2, res; -- 2.30.2