On Mon, Aug 10, 2020 at 05:29:49PM +0000, GT wrote: > > For PowerPC, if all you want to support is b which requires VSX, then the > > right thing is for !TREE_PUBLIC functions return 0 if !TARGET_VSX and > > otherwise set vecsize_mangle to 'b' and in the end return 1, for exported > > functions always set it to 'b' (and in the end return 1). > > Then ensure that the 'b' variants of function definitions get target ("vsx") > > attribute added if !TARGET_VSX. > > > > So setting attribute "vsx" for 'b' variants of function definitions is what > should go in function rs6000_simd_clone_usable?
No. That function should say if the particular clone ('b' in this case) is usable from some caller, and the answer for your 'b' is TARGET_VSX is required to be non-zero. The adjustment should go into the simd_clone_adjust target hook, see what ix86_simd_clone_adjust does (though, that one has more variants to handle). Jakub