https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108396

--- Comment #10 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Carl Love from comment #9)
> I made a copy of rs6000-overload.def and then with a series of emacs macros
> converted the list of builtins to a script to grep for the builtins in the
> test directory.  Specifically from rs6000-overload.def:
> 
> [BCDADD, __builtin_bcdadd, __builtin_vec_bcdadd]
>   vsq __builtin_vec_bcdadd (vsq, vsq, const int);
>     BCDADD_V1TI
>   vuc __builtin_vec_bcdadd (vuc, vuc, const int);
>     BCDADD_V16QI
> 
> [BCDADD_EQ, __builtin_bcdadd_eq, __builtin_vec_bcdadd_eq]
>   signed int __builtin_vec_bcdadd_eq (vsq, vsq, const int);
>     BCDADD_EQ_V1TI
>   signed int __builtin_vec_bcdadd_eq (vuc, vuc, const int);
>     BCDADD_EQ_V16QI
> 
> ....
> 
> Was converted to the bash script:
> 
> rm -f ../test1_not_found 
> 
> NOT_FOUND='0       0       0'
> check_name () {
>   str1=$(grep -r  $1 * | wc)
> 
> #  echo " output of command: $str1"
> 
>   if [[ "$str1" == *"$NOT_FOUND"* ]]; then
>     echo "$1 not found"       >> ../test1_not_found
>   fi
> }
> 
> check_name "__builtin_bcdadd" "__builtin_vec_bcdadd"
> 
> check_name "__builtin_bcdadd_eq" "__builtin_vec_bcdadd_eq"
> 
> ....
>  
> The script is passed the user built-in name ($str1) and the internal
> built-in name ($str2).  I ran the script in directory
> gcc/testsuite/gcc.target/powerpc
> and it identified two tests ($str1) as not showing up in a test file.  The
> tests were:  __builtin_bcdsub_ge and __builtin_bcdsub_le.
> 
> I figure if the first builtin name has a test associated with it that should
> be sufficient.  I will create a patch to add testcases for the two missing
> builtin-names.
> 
> I did add to the script to see how many definitions have a test for the
> built-in name $1 but not the built-in name $2 doesn't show up in a test
> file.  My script identified 86 of these cases.  Not sure that we really need
> to add test cases for the internal builtin name ($str).  Thoughts?

Thanks for tracking this!  As you said, I think checking the name $1 is
sufficient since only those are visible for users. btw, since this is closed,
let us discuss it on the internal issue further. :)

Reply via email to