On Wed, 28 Feb 2024 02:24:40 PST (-0800), Robin Dapp wrote:
I suggest specify -fno-schedule-insns to force tests assembler never
change for any scheduling model.
We already do that and that's the point - as I mentioned before, no
scheduling is worse than default scheduling here (for some definition
of worse). The way to reduce the number of vsetvls is to set the
load latency to a low value.
I think -fno-schedule-insns is a perfectly reasonable way to get rid of
the test failures in the short term.
Using -fno-schedule-insns doesn't really fix the core fragility of the
tests, though: what the pass does depends very much on the order of
instructions it sees, so anything that reorders RTL is going to cause
churn in the tests. Sure getting rid of scheduling will get rid of a
big cause for reordering, but any pass could reorder RTL and thus change
the expected vsetvl counts.
Maybe the right thing to do here is to rewrite these as RTL tests? That
way we can very tightly control the input ordering. It's kind of the
opposite of Jeff's suggestion to add more debug output to the pass, but
I think that wouldn't actually solve the issue: we're not having trouble
matching assembly, the fragility comes from the input side.
That might be a "grass is always greener" thing, though, as I don't
think I've managed to write a useful RTL test yet...
Regards
Robin