On Tue, 2017-06-20 at 09:04 +0000, Hurugalawadi, Naveen wrote:
> Hi Joesph,
> 
> Thanks for your review and valuable comments on this issue.
> 
> Please find attached the patch that merges x86-intrinsics for AArch64 and PPC
> architectures.
> 
> >> it would seem to me to be a bad idea to duplicate the 
> >> implementation for more and more architectures.
> Merged the implementation for AArch64 and PPC architectures.
> 
> The testcase have not been merged yet. Will do it after checking out
> the comments on the current idea of implementation.
> 
> Please check the patch and let me know the comments.
> 
> Bootstrapped and Regression tested on aarch64-thunder-linux and PPC.
> 
I am not sure this works or is even a good idea.

As an accident bmiintrin.h can be implemented as C code or common
builtins. But bmi2intrin.h depends on __builtin_bpermd which to my
knowledge is PowerISA only.

As I work on mmx, sse, sse2, etc it gets more complicated. There are
many X86 intrinsic instances that require altivec.h unique instrisics to
implement efficiently for the power64le target and some inline __asm.

Net the current sample size so far is to small to make a reasonable
assessment.

And as you see see below the gcc.target tests have to be duplicated
anyway. Even if the C code is common there will many differences in
dg-options and dg-require-effective-target. Trying to common these
implementations only creates more small files to manage.

> Thanks,
> Naveen
> 
> 2017-06-20  Naveen H.S  <naveen.hurugalaw...@cavium.com>
> 
> [gcc]
>       * config.gcc (aarch64*-*-*): Add bmi2intrin.h, bmiintrin.h,
>       adxintrin.h and x86intrin.h in Config folder.
>       (powerpc*-*-*): Move bmi2intrin.h, bmiintrin.h and x86intrin.h into
>       Config folder.
>       * config/adxintrin.h: New file.
>       * config/bmi2intrin.h: New file.
>       * config/bmiintrin.h: New file.
>       * config/x86intrin.h: New file.
>       * config/rs6000/bmi2intrin.h: Delete file.
>       * config/rs6000/bmiintrin.h: Likewise.
>       * config/rs6000/x86intrin.h: Likewise.
> 
> [gcc/testsuite]
> 
>       * gcc.target/aarch64/adx-addcarryx32-1.c: New file.
>       * gcc.target/aarch64/adx-addcarryx32-2.c: New file.
>       * gcc.target/aarch64/adx-addcarryx32-3.c: New file.
>       * gcc.target/aarch64/adx-addcarryx64-1.c: New file.
>       * gcc.target/aarch64/adx-addcarryx64-2.c: New file
>       * gcc.target/aarch64/adx-addcarryx64-3.c: New file
>       * gcc.target/aarch64/adx-check.h: New file
>       * gcc.target/aarch64/bmi-andn-1.c: New file
>       * gcc.target/aarch64/bmi-andn-2.c: New file.
>       * gcc.target/aarch64/bmi-bextr-1.c: New file.
>       * gcc.target/aarch64/bmi-bextr-2.c: New file.
>       * gcc.target/aarch64/bmi-bextr-4.c: New file.
>       * gcc.target/aarch64/bmi-bextr-5.c: New file.
>       * gcc.target/aarch64/bmi-blsi-1.c: New file.
>       * gcc.target/aarch64/bmi-blsi-2.c: New file.
>       * gcc.target/aarch64/bmi-blsmsk-1.c: new file.
>       * gcc.target/aarch64/bmi-blsmsk-2.c: New file.
>       * gcc.target/aarch64/bmi-blsr-1.c: New file.
>       * gcc.target/aarch64/bmi-blsr-2.c: New File.
>       * gcc.target/aarch64/bmi-check.h: New File.
>       * gcc.target/aarch64/bmi-tzcnt-1.c: new file.
>       * gcc.target/aarch64/bmi-tzcnt-2.c: New file.
>       * gcc.target/aarch64/bmi2-bzhi32-1.c: New file.
>       * gcc.target/aarch64/bmi2-bzhi64-1.c: New file.
>       * gcc.target/aarch64/bmi2-bzhi64-1a.c: New file.
>       * gcc.target/aarch64/bmi2-check.h: New file.
>       * gcc.target/aarch64/bmi2-mulx32-1.c: New file.
>       * gcc.target/aarch64/bmi2-mulx32-2.c: New file.
>       * gcc.target/aarch64/bmi2-mulx64-1.c: New file.
>       * gcc.target/aarch64/bmi2-mulx64-2.c: New file.
>       * gcc.target/aarch64/bmi2-pdep32-1.c: New file.
>       * gcc.target/aarch64/bmi2-pdep64-1.c: New file.
>       * gcc.target/aarch64/bmi2-pext32-1.c: New File.
>       * gcc.target/aarch64/bmi2-pext64-1.c: New file.
>       * gcc.target/aarch64/bmi2-pext64-1a.c: New File.


Reply via email to