Kewen: On 5/13/24 19:55, Kewen.Lin wrote: > Hi, > > on 2024/4/20 05:18, Carl Love wrote: >> rs6000, remove the vec_xxsel built-ins, they are duplicates <snip>
>> -int do_sel(void) >> -{ >> - int i = 0; >> - >> - si[i][0] = __builtin_vsx_xxsel_4si (si[i][1], si[i][2], si[i][3]); i++; ^ changed to ui >> - ss[i][0] = __builtin_vsx_xxsel_8hi (ss[i][1], ss[i][2], ss[i][3]); i++; ^ changed to ui >> - sc[i][0] = __builtin_vsx_xxsel_16qi (sc[i][1], sc[i][2], sc[i][3]); i++; ^ changed to uc >> - f[i][0] = __builtin_vsx_xxsel_4sf (f[i][1], f[i][2], f[i][3]); i++; >> - d[i][0] = __builtin_vsx_xxsel_2df (d[i][1], d[i][2], d[i][3]); i++; >> - >> - si[i][0] = __builtin_vsx_xxsel (si[i][1], si[i][2], bi[i][3]); i++; >> - ss[i][0] = __builtin_vsx_xxsel (ss[i][1], ss[i][2], bs[i][3]); i++; >> - sc[i][0] = __builtin_vsx_xxsel (sc[i][1], sc[i][2], bc[i][3]); i++; >> - f[i][0] = __builtin_vsx_xxsel (f[i][1], f[i][2], bi[i][3]); i++; >> - d[i][0] = __builtin_vsx_xxsel (d[i][1], d[i][2], bl[i][3]); i++; >> - >> - si[i][0] = __builtin_vsx_xxsel (si[i][1], si[i][2], ui[i][3]); i++; >> - ss[i][0] = __builtin_vsx_xxsel (ss[i][1], ss[i][2], us[i][3]); i++; >> - sc[i][0] = __builtin_vsx_xxsel (sc[i][1], sc[i][2], uc[i][3]); i++; >> - f[i][0] = __builtin_vsx_xxsel (f[i][1], f[i][2], ui[i][3]); i++; >> - d[i][0] = __builtin_vsx_xxsel (d[i][1], d[i][2], ul[i][3]); i++; >> - >> - return i; >> -} >> - > > I prefer to keep them but just replacing the call with vec_sel. > > OK with the above nits tweaked, thanks. OK, changed __builtin_vsx_xxsel_4si_* to vec_sel, changed__builtin_vsx_xxsel to vec_sel. Had to add #include <altivec.h>. Finally, changed the third argument for the first three calls, as noted above, to be compatible with the vec_sel built-in specification. Carl > > BR, > Kewen > >> int do_perm(void) >> { >> int i = 0; >