On 5/20/21 4:57 PM, Segher Boessenkool wrote:
Is there some (semi-)automatic way to compare the results of the old
and new systems?
Yes...very "semi".  There's a patch in the series that updates the information printed from -mdebug=builtin.  I use this to print the builtins generated by the old and new versions, and run them through a Python script to look for anything missing or added, any mismatches in the type system, mismatches in const/pure/etc., that sort of thing.  I found quite a lot of mistakes this way and got them fixed ahead of time.  In the script I maintain a table of expected differences, where there were just errors before, etc., and there's a short doc string with each of them.  So I can go back and look at that if we run into any discrepancies in the future.  The script doesn't have long-term value beyond that; once we delete the old version in a future patch, it won't have anything to compare against.
Patch 0057: Fix one last late-breaking change

   Keeping the code up-to-date with upstream has been fun.  When I
   rebased to create the patch set, I found one new issue where a
   small change had been made to the overload handling for the
   vec_insert builtins.  This patch reflects that change into the
   new handling.  My version of git is having trouble with
   interactive rebasing, so it was easier to just add the extra patch.
What breaks by keeping this fix after the other patches?
Nothing truly breaks.  There is a VSX-efficient implementation of vec_insert and a less-efficient implementation.  Late in GCC 11, somebody recognized the VSX-efficient implementation could be used in more situations.  Without this patch, we still use the less-efficient implementation in the new version.

(3) A number of built-ins used "long" for DImode types, which would
break these for 32-bit.  I changed those arguments and return values
to "long long" to avoid such problems, when those built-ins were not
restricted to 64-bit mode already.  There aren't many such cases.
You can do this for 64-bit-only builtins as well -- the actual argument
type is never visible (to the user), and everything becomes modes early.

Yep -- in fact, the old system generally used a (V2)DImode type for such things, and I've just translated all of those to (vector) long long in the new prototypes.

Thanks for the ongoing review!

Bill

Reply via email to