amdgcn: implement vector div and mod libfuncs
Also divmod, but only for scalar modes, for now (because there are no complex int vectors yet). gcc/ChangeLog: * config/gcn/gcn.cc (gcn_expand_divmod_libfunc): New function. (gcn_init_libfuncs): Add div and mod functions for all modes. Add placeholders for divmod functions. (TARGET_EXPAND_DIVMOD_LIBFUNC): Define. libgcc/ChangeLog: * config/gcn/lib2-divmod-di.c: Reimplement like lib2-divmod.c. * config/gcn/lib2-divmod.c: Likewise. * config/gcn/lib2-gcn.h: Add new types and prototypes for all the new vector libfuncs. * config/gcn/t-amdgcn: Add new files. * config/gcn/amdgcn_veclib.h: New file. * config/gcn/lib2-vec_divmod-di.c: New file. * config/gcn/lib2-vec_divmod-hi.c: New file. * config/gcn/lib2-vec_divmod-qi.c: New file. * config/gcn/lib2-vec_divmod.c: New file. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/predcom-2.c: Avoid vectors on amdgcn. * gcc.dg/unroll-8.c: Likewise. * gcc.dg/vect/slp-26.c: Change expected results on amdgdn. * lib/target-supports.exp (check_effective_target_vect_int_mod): Add amdgcn. (check_effective_target_divmod): Likewise. * gcc.target/gcn/simd-math-3-16.c: New test. * gcc.target/gcn/simd-math-3-2.c: New test. * gcc.target/gcn/simd-math-3-32.c: New test. * gcc.target/gcn/simd-math-3-4.c: New test. * gcc.target/gcn/simd-math-3-8.c: New test. * gcc.target/gcn/simd-math-3-char-16.c: New test. * gcc.target/gcn/simd-math-3-char-2.c: New test. * gcc.target/gcn/simd-math-3-char-32.c: New test. * gcc.target/gcn/simd-math-3-char-4.c: New test. * gcc.target/gcn/simd-math-3-char-8.c: New test. * gcc.target/gcn/simd-math-3-char-run-16.c: New test. * gcc.target/gcn/simd-math-3-char-run-2.c: New test. * gcc.target/gcn/simd-math-3-char-run-32.c: New test. * gcc.target/gcn/simd-math-3-char-run-4.c: New test. * gcc.target/gcn/simd-math-3-char-run-8.c: New test. * gcc.target/gcn/simd-math-3-char-run.c: New test. * gcc.target/gcn/simd-math-3-char.c: New test. * gcc.target/gcn/simd-math-3-long-16.c: New test. * gcc.target/gcn/simd-math-3-long-2.c: New test. * gcc.target/gcn/simd-math-3-long-32.c: New test. * gcc.target/gcn/simd-math-3-long-4.c: New test. * gcc.target/gcn/simd-math-3-long-8.c: New test. * gcc.target/gcn/simd-math-3-long-run-16.c: New test. * gcc.target/gcn/simd-math-3-long-run-2.c: New test. * gcc.target/gcn/simd-math-3-long-run-32.c: New test. * gcc.target/gcn/simd-math-3-long-run-4.c: New test. * gcc.target/gcn/simd-math-3-long-run-8.c: New test. * gcc.target/gcn/simd-math-3-long-run.c: New test. * gcc.target/gcn/simd-math-3-long.c: New test. * gcc.target/gcn/simd-math-3-run-16.c: New test. * gcc.target/gcn/simd-math-3-run-2.c: New test. * gcc.target/gcn/simd-math-3-run-32.c: New test. * gcc.target/gcn/simd-math-3-run-4.c: New test. * gcc.target/gcn/simd-math-3-run-8.c: New test. * gcc.target/gcn/simd-math-3-run.c: New test. * gcc.target/gcn/simd-math-3-short-16.c: New test. * gcc.target/gcn/simd-math-3-short-2.c: New test. * gcc.target/gcn/simd-math-3-short-32.c: New test. * gcc.target/gcn/simd-math-3-short-4.c: New test. * gcc.target/gcn/simd-math-3-short-8.c: New test. * gcc.target/gcn/simd-math-3-short-run-16.c: New test. * gcc.target/gcn/simd-math-3-short-run-2.c: New test. * gcc.target/gcn/simd-math-3-short-run-32.c: New test. * gcc.target/gcn/simd-math-3-short-run-4.c: New test. * gcc.target/gcn/simd-math-3-short-run-8.c: New test. * gcc.target/gcn/simd-math-3-short-run.c: New test. * gcc.target/gcn/simd-math-3-short.c: New test. * gcc.target/gcn/simd-math-3.c: New test. * gcc.target/gcn/simd-math-4-char-run.c: New test. * gcc.target/gcn/simd-math-4-char.c: New test. * gcc.target/gcn/simd-math-4-long-run.c: New test. * gcc.target/gcn/simd-math-4-long.c: New test. * gcc.target/gcn/simd-math-4-run.c: New test. * gcc.target/gcn/simd-math-4-short-run.c: New test. * gcc.target/gcn/simd-math-4-short.c: New test. * gcc.target/gcn/simd-math-4.c: New test. * gcc.target/gcn/simd-math-5-16.c: New test. * gcc.target/gcn/simd-math-5-32.c: New test. * gcc.target/gcn/simd-math-5-4.c: New test. * gcc.target/gcn/simd-math-5-8.c: New test. * gcc.target/gcn/simd-math-5-char-16.c: New test. * gcc.target/gcn/simd-math-5-char-32.c: New test. * gcc.target/gcn/simd-math-5-char-4.c: New test. * gcc.target/gcn/simd-math-5-char-8.c: New test. * gcc.target/gcn/simd-math-5-char-run-16.c: New test. * gcc.target/gcn/simd-math-5-char-run-32.c: New test. * gcc.target/gcn/simd-math-5-char-run-4.c: New test. * gcc.target/gcn/simd-math-5-char-run-8.c: New test. * gcc.target/gcn/simd-math-5-char-run.c: New test. * gcc.target/gcn/simd-math-5-char.c: New test. * gcc.target/gcn/simd-math-5-long-16.c: New test. * gcc.target/gcn/simd-math-5-long-32.c: New test. * gcc.target/gcn/simd-math-5-long-4.c: New test. * gcc.target/gcn/simd-math-5-long-8.c: New test. * gcc.target/gcn/simd-math-5-long-run-16.c: New test. * gcc.target/gcn/simd-math-5-long-run-32.c: New test. * gcc.target/gcn/simd-math-5-long-run-4.c: New test. * gcc.target/gcn/simd-math-5-long-run-8.c: New test. * gcc.target/gcn/simd-math-5-long-run.c: New test. * gcc.target/gcn/simd-math-5-long.c: New test. * gcc.target/gcn/simd-math-5-run-16.c: New test. * gcc.target/gcn/simd-math-5-run-32.c: New test. * gcc.target/gcn/simd-math-5-run-4.c: New test. * gcc.target/gcn/simd-math-5-run-8.c: New test. * gcc.target/gcn/simd-math-5-run.c: New test. * gcc.target/gcn/simd-math-5-short-16.c: New test. * gcc.target/gcn/simd-math-5-short-32.c: New test. * gcc.target/gcn/simd-math-5-short-4.c: New test. * gcc.target/gcn/simd-math-5-short-8.c: New test. * gcc.target/gcn/simd-math-5-short-run-16.c: New test. * gcc.target/gcn/simd-math-5-short-run-32.c: New test. * gcc.target/gcn/simd-math-5-short-run-4.c: New test. * gcc.target/gcn/simd-math-5-short-run-8.c: New test. * gcc.target/gcn/simd-math-5-short-run.c: New test. * gcc.target/gcn/simd-math-5-short.c: New test. * gcc.target/gcn/simd-math-5.c: New test.
Showing
- gcc/config/gcn/gcn.cc 244 additions, 0 deletionsgcc/config/gcn/gcn.cc
- gcc/testsuite/gcc.dg/tree-ssa/predcom-2.c 1 addition, 0 deletionsgcc/testsuite/gcc.dg/tree-ssa/predcom-2.c
- gcc/testsuite/gcc.dg/unroll-8.c 2 additions, 0 deletionsgcc/testsuite/gcc.dg/unroll-8.c
- gcc/testsuite/gcc.dg/vect/slp-26.c 4 additions, 4 deletionsgcc/testsuite/gcc.dg/vect/slp-26.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-16.c 13 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-16.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-2.c 13 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-2.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-32.c 13 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-32.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-4.c 13 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-4.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-8.c 13 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-8.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-char-16.c 11 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-char-16.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-char-2.c 11 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-char-2.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-char-32.c 11 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-char-32.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-char-4.c 11 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-char-4.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-char-8.c 11 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-char-8.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-char-run-16.c 2 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-char-run-16.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-char-run-2.c 2 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-char-run-2.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-char-run-32.c 2 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-char-run-32.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-char-run-4.c 2 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-char-run-4.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-char-run-8.c 2 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-char-run-8.c
- gcc/testsuite/gcc.target/gcn/simd-math-3-char-run.c 2 additions, 0 deletionsgcc/testsuite/gcc.target/gcn/simd-math-3-char-run.c
Loading
Please register or sign in to comment