On 06/06/2017 07:12 AM, Tom de Vries wrote: > Hi, > > this patch adds v2di support to the nvptx target. This allows us to > generate 128-bit loads and stores. > > Tested in nvptx mainkernel mode and x86_64 accelerator mode. > > OK for trunk? > > Thanks, > - Tom > > 0003-Add-v2di-support.patch > > > Add v2di support > > 2017-06-06 Tom de Vries <t...@codesourcery.com> > > * config/nvptx/nvptx-modes.def: Add V2DImode. > * config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare. > * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode. > (nvptx_output_mov_insn): Handle lack of mov.b128. > (nvptx_print_operand): Handle 'H' and 'L' codes. > (nvptx_vector_mode_supported): Allow V2DImode. > (nvptx_preferred_simd_mode): New function. > (nvptx_data_alignment): New function. > (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to > nvptx_preferred_simd_mode. > * config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from > 64 to 128 bits. > (DATA_ALIGNMENT): Define. Set to nvptx_data_alignment. > > * config/nvptx/nvptx.md (VECIM): Add V2DI. > > * gcc.target/nvptx/decl-init.c: Update alignment. > * gcc.target/nvptx/slp-2-run.c: New test. > * gcc.target/nvptx/slp-2.c: New test. > * gcc.target/nvptx/v2di.c: New test. > > * testsuite/libgomp.oacc-c/vec.c: New test. > OK. I'm going to take your word that bumping STACK_BOUNDARY is the right thing to do rather than dynamic realignment. Presumably mixing code from different PTX compilers isn't something we're really worrying about yet anyway...
jeff