Looking at the latest version of the Power Vector Intrinsic Programming Reference (Revision 2.0.0_prd, Bill slipped this to me for review), I see that vec_test_lsbb_all_ones vec_test_lsbb_all_zeros both specify vector unsigned char, only.
On Mon, Aug 5, 2024 at 1:15 AM Kewen.Lin <li...@linux.ibm.com> wrote: > on 2024/8/3 05:48, Peter Bergner wrote: > > On 7/31/24 10:21 PM, Kewen.Lin wrote: > >> on 2024/8/1 01:52, Carl Love wrote: > >>> Yes, I noticed that the built-ins were defined as overloaded but only > had one definition. Did seem odd to me. > >>> > >>>> either is with "vector unsigned char" as argument type, but the > corresponding instance > >>>> prototype in builtin table is with "vector signed char". It's > inconsistent and weird, > >>>> I think we can just update the prototype in builtin table with > "vector unsigned char" > >>>> and remove the entries in overload table. It can be a follow up > patch. > >>> > >>> I didn't notice that it was signed in the instance prototype but > unsigned in the overloaded definition. That is definitely inconsistent. > >>> > >>> That said, should we just go ahead and support both signed and > unsigned argument versions of the all ones and all zeros built-ins? > >> > >> Good question, I thought about that but found openxl only supports the > unsigned version > >> so I felt it's probably better to keep consistent with it. But I'm > fine for either, if > >> we decide to extend it to cover both signed and unsigned, we should > notify openxl team > >> to extend it as well. > >> > >> openxl doc links: > >> > >> > https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.2?topic=functions-vec-test-lsbb-all-ones > >> > https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.2?topic=functions-vec-test-lsbb-all-zeros > > > > If it makes sense to support vector signed char rather than only the > vector unsigned char, > > then I'm fine adding support for it. It almost seems since we tried > adding an overload > > for it, that that was our intention (to support both signed and > unsigned) and we just > > had a bug so only unsigned was supported? > > Good question but I'm not sure, it could be an oversight without adding > one more instance > for overloading, or adopting some useless code (only for overloading) for > a single instance. > I found it's introduced by r11-2437-gcf5d0fc2d1adcd, CC'ed Will as he > contributed this. > > BR, > Kewen > > > > > CC'ing Steve since he noticed the missing documentation when we was > trying to > > use the built-ins. Steve, do you see a need to also support vector > signed char > > with these built-ins? > > > > Peter > > > > > >