1  /* { dg-do compile } */
       2  /* { dg-require-effective-target powerpc_p8vector_ok } */
       3  /* { dg-options "-mdejagnu-cpu=power8 -O2 -fdump-tree-gimple" } */
       4  
       5  /* Verify that overloaded built-ins for "eqv", "nand" and "orc" do not
       6     produce VIEW_CONVERT_EXPR operations on their operands.  Like so:
       7  
       8    _1 = VIEW_CONVERT_EXPR<__vector signed int>(x);
       9    _2 = VIEW_CONVERT_EXPR<__vector signed int>(y);
      10    _3 = __builtin_altivec_vand (_1, _2);
      11    D.3245 = VIEW_CONVERT_EXPR<bcvec_t>(_3);
      12  */
      13  
      14  typedef __attribute__((altivec(vector__))) __attribute__((altivec(bool__))) char bcvec_t;
      15  typedef __attribute__((altivec(vector__))) signed char scvec_t;
      16  typedef __attribute__((altivec(vector__))) unsigned char ucvec_t;
      17  
      18  typedef __attribute__((altivec(vector__))) __attribute__((altivec(bool__))) short bsvec_t;
      19  typedef __attribute__((altivec(vector__))) signed short ssvec_t;
      20  typedef __attribute__((altivec(vector__))) unsigned short usvec_t;
      21  
      22  typedef __attribute__((altivec(vector__))) __attribute__((altivec(bool__))) int bivec_t;
      23  typedef __attribute__((altivec(vector__))) signed int sivec_t;
      24  typedef __attribute__((altivec(vector__))) unsigned int uivec_t;
      25  
      26  typedef __attribute__((altivec(vector__))) __attribute__((altivec(bool__))) long long bllvec_t;
      27  typedef __attribute__((altivec(vector__))) signed long long sllvec_t;
      28  typedef __attribute__((altivec(vector__))) unsigned long long ullvec_t;
      29  
      30  typedef __attribute__((altivec(vector__))) double dvec_t;
      31  typedef __attribute__((altivec(vector__))) float fvec_t;
      32  
      33  bcvec_t
      34  eqv_0 (bcvec_t x, bcvec_t y)
      35  {
      36    return __builtin_vec_eqv (x, y);
      37  }
      38  
      39  scvec_t
      40  eqv_1 (scvec_t x, scvec_t y)
      41  {
      42    return __builtin_vec_eqv (x, y);
      43  }
      44  
      45  ucvec_t
      46  eqv_2 (ucvec_t x, ucvec_t y)
      47  {
      48    return __builtin_vec_eqv (x, y);
      49  }
      50  
      51  bsvec_t
      52  eqv_3 (bsvec_t x, bsvec_t y)
      53  {
      54    return __builtin_vec_eqv (x, y);
      55  }
      56  
      57  ssvec_t
      58  eqv_4 (ssvec_t x, ssvec_t y)
      59  {
      60    return __builtin_vec_eqv (x, y);
      61  }
      62  
      63  usvec_t
      64  eqv_5 (usvec_t x, usvec_t y)
      65  {
      66    return __builtin_vec_eqv (x, y);
      67  }
      68  
      69  bivec_t
      70  eqv_6 (bivec_t x, bivec_t y)
      71  {
      72    return __builtin_vec_eqv (x, y);
      73  }
      74  
      75  sivec_t
      76  eqv_7 (sivec_t x, sivec_t y)
      77  {
      78    return __builtin_vec_eqv (x, y);
      79  }
      80  
      81  uivec_t
      82  eqv_8 (uivec_t x, uivec_t y)
      83  {
      84    return __builtin_vec_eqv (x, y);
      85  }
      86  
      87  bllvec_t
      88  eqv_9 (bllvec_t x, bllvec_t y)
      89  {
      90    return __builtin_vec_eqv (x, y);
      91  }
      92  
      93  sllvec_t
      94  eqv_10 (sllvec_t x, sllvec_t y)
      95  {
      96    return __builtin_vec_eqv (x, y);
      97  }
      98  
      99  ullvec_t
     100  eqv_11 (ullvec_t x, ullvec_t y)
     101  {
     102    return __builtin_vec_eqv (x, y);
     103  }
     104  
     105  dvec_t
     106  eqv_12 (dvec_t x, dvec_t y)
     107  {
     108    return __builtin_vec_eqv (x, y);
     109  }
     110  
     111  fvec_t
     112  eqv_13 (fvec_t x, fvec_t y)
     113  {
     114    return __builtin_vec_eqv (x, y);
     115  }
     116  
     117  bcvec_t
     118  nand_0 (bcvec_t x, bcvec_t y)
     119  {
     120    return __builtin_vec_nand (x, y);
     121  }
     122  
     123  scvec_t
     124  nand_1 (scvec_t x, scvec_t y)
     125  {
     126    return __builtin_vec_nand (x, y);
     127  }
     128  
     129  ucvec_t
     130  nand_2 (ucvec_t x, ucvec_t y)
     131  {
     132    return __builtin_vec_nand (x, y);
     133  }
     134  
     135  bsvec_t
     136  nand_3 (bsvec_t x, bsvec_t y)
     137  {
     138    return __builtin_vec_nand (x, y);
     139  }
     140  
     141  ssvec_t
     142  nand_4 (ssvec_t x, ssvec_t y)
     143  {
     144    return __builtin_vec_nand (x, y);
     145  }
     146  
     147  usvec_t
     148  nand_5 (usvec_t x, usvec_t y)
     149  {
     150    return __builtin_vec_nand (x, y);
     151  }
     152  
     153  bivec_t
     154  nand_6 (bivec_t x, bivec_t y)
     155  {
     156    return __builtin_vec_nand (x, y);
     157  }
     158  
     159  sivec_t
     160  nand_7 (sivec_t x, sivec_t y)
     161  {
     162    return __builtin_vec_nand (x, y);
     163  }
     164  
     165  uivec_t
     166  nand_8 (uivec_t x, uivec_t y)
     167  {
     168    return __builtin_vec_nand (x, y);
     169  }
     170  
     171  bllvec_t
     172  nand_9 (bllvec_t x, bllvec_t y)
     173  {
     174    return __builtin_vec_nand (x, y);
     175  }
     176  
     177  sllvec_t
     178  nand_10 (sllvec_t x, sllvec_t y)
     179  {
     180    return __builtin_vec_nand (x, y);
     181  }
     182  
     183  ullvec_t
     184  nand_11 (ullvec_t x, ullvec_t y)
     185  {
     186    return __builtin_vec_nand (x, y);
     187  }
     188  
     189  dvec_t
     190  nand_12 (dvec_t x, dvec_t y)
     191  {
     192    return __builtin_vec_nand (x, y);
     193  }
     194  
     195  fvec_t
     196  nand_13 (fvec_t x, fvec_t y)
     197  {
     198    return __builtin_vec_nand (x, y);
     199  }
     200  
     201  bcvec_t
     202  orc_0 (bcvec_t x, bcvec_t y)
     203  {
     204    return __builtin_vec_orc (x, y);
     205  }
     206  
     207  scvec_t
     208  orc_1 (scvec_t x, scvec_t y)
     209  {
     210    return __builtin_vec_orc (x, y);
     211  }
     212  
     213  ucvec_t
     214  orc_2 (ucvec_t x, ucvec_t y)
     215  {
     216    return __builtin_vec_orc (x, y);
     217  }
     218  
     219  bsvec_t
     220  orc_3 (bsvec_t x, bsvec_t y)
     221  {
     222    return __builtin_vec_orc (x, y);
     223  }
     224  
     225  ssvec_t
     226  orc_4 (ssvec_t x, ssvec_t y)
     227  {
     228    return __builtin_vec_orc (x, y);
     229  }
     230  
     231  usvec_t
     232  orc_5 (usvec_t x, usvec_t y)
     233  {
     234    return __builtin_vec_orc (x, y);
     235  }
     236  
     237  bivec_t
     238  orc_6 (bivec_t x, bivec_t y)
     239  {
     240    return __builtin_vec_orc (x, y);
     241  }
     242  
     243  sivec_t
     244  orc_7 (sivec_t x, sivec_t y)
     245  {
     246    return __builtin_vec_orc (x, y);
     247  }
     248  
     249  uivec_t
     250  orc_8 (uivec_t x, uivec_t y)
     251  {
     252    return __builtin_vec_orc (x, y);
     253  }
     254  
     255  bllvec_t
     256  orc_9 (bllvec_t x, bllvec_t y)
     257  {
     258    return __builtin_vec_orc (x, y);
     259  }
     260  
     261  sllvec_t
     262  orc_10 (sllvec_t x, sllvec_t y)
     263  {
     264    return __builtin_vec_orc (x, y);
     265  }
     266  
     267  ullvec_t
     268  orc_11 (ullvec_t x, ullvec_t y)
     269  {
     270    return __builtin_vec_orc (x, y);
     271  }
     272  
     273  dvec_t
     274  orc_12 (dvec_t x, dvec_t y)
     275  {
     276    return __builtin_vec_orc (x, y);
     277  }
     278  
     279  fvec_t
     280  orc_13 (fvec_t x, fvec_t y)
     281  {
     282    return __builtin_vec_orc (x, y);
     283  }
     284  
     285  /* { dg-final { scan-tree-dump-not "VIEW_CONVERT_EXPR" "gimple" } } */