(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
nvptx/
mul-hi64.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -Wno-long-long" } */
       3  
       4  typedef unsigned int __attribute ((mode(TI))) uti_t;
       5  typedef int __attribute ((mode(TI))) ti_t;
       6  
       7  long test1(long x, long y)
       8  {
       9    return ((ti_t)x * (ti_t)y) >> 64;
      10  }
      11  
      12  long test2(long x)
      13  {
      14    return ((ti_t)x * 19065) >> 64;
      15  }
      16  
      17  long test3(long x, long y)
      18  {
      19    return (uti_t)((ti_t)x * (ti_t)y) >> 64;
      20  }
      21  
      22  long test4(long x)
      23  {
      24    return (uti_t)((ti_t)x * 19065) >> 64;
      25  }
      26  
      27  ti_t test5(long x, long y)
      28  {
      29    return ((ti_t)x * (ti_t)y) >> 64;
      30  }
      31  
      32  ti_t test6(long x)
      33  {
      34    return ((ti_t)x * 19065) >> 64;
      35  }
      36  
      37  uti_t test7(long x, long y)
      38  {
      39    return (uti_t)((ti_t)x * (ti_t)y) >> 64;
      40  }
      41  
      42  uti_t test8(long x)
      43  {
      44    return (uti_t)((ti_t)x * 19065) >> 64;
      45  }
      46  
      47  /* { dg-final { scan-assembler-times "mul.hi.s64" 8 } } */