This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Replace comparison operators with vec_cmp* in intrinsic compatibility headers
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Bill Schmidt <wschmidt at linux dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 25 Oct 2018 12:28:57 -0500
- Subject: Re: [PATCH, rs6000] Replace comparison operators with vec_cmp* in intrinsic compatibility headers
- References: <94afcb48-aa72-dd2b-375c-d747257552df@linux.ibm.com>
Hi!
On Wed, Oct 24, 2018 at 02:30:10PM -0500, Bill Schmidt wrote:
> Due to some unfortunate history, not all compilers currently have correct result
> types produced for comparison operators on vector types. For compatibility
> purposes, this patch replaces those with vec_cmp* built-ins. It also cleans up
> some silly type usages and formatting in the affected functions.
Those compilers really need to be fixed, this isn't a tiny detail they
get wrong.
But, this patch makes the code more readable, so okay. Thanks!
Segher
> 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
> Jinsong Ji <jji@us.ibm.com>
>
> * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
> comparison operators with vec_cmp* for compatibility due to
> unfortunate history; clean up formatting and use types more
> appropriately.
> (_mm_sll_epi32): Likewise.
> (_mm_sll_epi64): Likewise.
> (_mm_srl_epi16): Likewise.
> (_mm_srl_epi32): Likewise.
> (_mm_srl_epi64): Likewise.