(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
nvptx/
atomic-store-1.c
       1  /* Test the atomic store expansion for sm <= sm_6x targets,
       2     shared state space.  */
       3  
       4  /* { dg-do compile } */
       5  /* { dg-options "-misa=sm_53 -mptx=_" } */
       6  
       7  enum memmodel
       8  {
       9    MEMMODEL_SEQ_CST = 5
      10  };
      11  
      12  unsigned int u32 __attribute__((shared));
      13  unsigned long long int u64 __attribute__((shared));
      14  
      15  int
      16  main()
      17  {
      18    __atomic_store_n (&u32, 0, MEMMODEL_SEQ_CST);
      19    __atomic_store_n (&u64, 0, MEMMODEL_SEQ_CST);
      20  
      21    return 0;
      22  }
      23  
      24  /* { dg-final { scan-assembler-times "atom.shared.exch.b32\[\t \]+_," 1 } } */
      25  /* { dg-final { scan-assembler-times "atom.shared.exch.b64\[\t \]+_," 1 } } */
      26  /* { dg-final { scan-assembler-times "membar.cta" 4 } } */