<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 3, 2021 at 2:46 PM Nikita Popov via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Just my 2c, but I think we should allow unused prefixes. This does catch the occasional typo, but also has a cost: Historically, certain kinds of tests simply used a certain boilerplate of check lines, because differences are common, even if they don't occur for each test. For X86 vector tests, it makes more sense to simply always include AVX1 and AVX2 test prefixes, even if it so happens that for *this* particular test, codegen is identical and only the AVX prefix ends up being used. This means that whenever codegen changes in a minor way (e.g. due to a target-independent SimplyDemandedBits change that has no direct relation to X86) and a difference is introduced, you need to now figure out which new prefixes you have to add. Or drop prefixes if a codegen difference goes away. Having to manually adjust check prefixes takes away from the usual experience of "Just run update_(llc_)test_checks".<br></div><div><br></div><div>At least I personally have found the gradual migration towards disallowing unused prefixes to be more annoying than useful. I guess ergonomics could be improved if update_test_checks automatically dropped unused prefixes, but there's really no way to automatically add prefixes, without domain-specific knowledge.</div></div></div></blockquote><div><br></div><div>ISTM That the tests using update_test_checks should probably opt into allowing unused prefixes as a matter of course.</div><div><br></div><div>With a set of auto-updated checks, an unused prefix is unlikely to be due to a mistake, like it would indicate be for a manually maintained test. Maybe update_test_checks could even add the right argument to FileCheck automatically.</div><div><br></div></div></div>