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

--- Comment #14 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Hi!
(In reply to Avinash Jayakar from comment #12)
> (In reply to Segher Boessenkool from comment #10)
> > As a meta-comment: almost everything using scan-assembler-times is
> > obfuscated.
> > 
> > It should always say in comments *why* it expects it as many times as that,
> > so that when the test starts failing it is somewhat clear what happened :-)
> 
> I had a hard time understanding what the test case does for these vector
> test case. It looks like it just checks whether the load and store
> instructions are generated in the epilogue for each line in the loop. 

That is the goal maybe, yeah.

> Ideally since there are 7 additions and 10 types, there should be a load
> vector and store vector instruction for each addition roughly. 
> But the test looks for 120 lxv/lxvx instruction which also sees the
> instruction in the main loop as well as some loads happening from TOC, and
> is very confusing to figure out what the check is doing.

Yup, it should at a minimum be documented what it expects, or if possible
be written in such a way that things are clear and not so mixed up.

> Would it be better to just check what is generated in the epilogue instead
> of seeing the main loop as well for these tests?

But how can you do that?

It isn't obvious that this test wants to test just the loop epilogue code,
btw!

Reply via email to