[PATCH] D92404: [FileCheck] Enforce --allow-unused-prefixes=false for llvm/test/Transforms

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 09:10:02 PST 2020


mtrofin marked an inline comment as done.
mtrofin added inline comments.


================
Comment at: llvm/test/Transforms/LoopIdiom/X86/left-shift-until-bittest.ll:38
 ;
+; ALL%s-LABEL: @p0_i32(
+; ALL%s-NEXT:  entry:
----------------
jhenderson wrote:
> `ALL%s`? This doesn't look right to me...
Thanks for the catch - added fix to update_test_prefix.py. What was happening was: that script tries to clean up cases where, after removing unused prefixes, we're left with one prefix. If the FileCheck was written with %s after the check-prefixes argument, it would consume the space between the prefix and %s, resulting in (for example) "--check-prefix=ALL%s". I fixed by hand a few of these cases, but didn't notice there could be a follow-up behavior: if the test had this "NOTE: Assertions have been autogenerated...", update_test_prefix would also re-run the autogenerator. In this case, that's update_test_checks.py, which would notice the new prefix (ALL%s), and insert checks for it.

The update to update_test_prefix.py is here for reference, I'll patch it separately, then rebase this change. Added @pengfei for that part, to make sure I haven't missed something.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92404/new/

https://reviews.llvm.org/D92404



More information about the llvm-commits mailing list