[PATCH] D125405: [UpdateTestChecks] Use a counter for unpredictable FileCheck variables

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 11 10:43:54 PDT 2022


arichardson created this revision.
arichardson added reviewers: MaskRay, jdoerfert.
Herald added a subscriber: StephenFan.
Herald added a project: All.
arichardson requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Variable captures such as `<MCInst #` can change based on unrelated changes
to the LLVM backends, to avoid the generated test cases being different
use an incrementing counter for variable names instead of using the
actual value from the output file.
This change may also be beneficial for some nameless IR variables
(especially when combined with filtering of output), but for now I've
restricted this change to the obvious candidates (--asm-show-inst output).

Depends on D125307 <https://reviews.llvm.org/D125307>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125405

Files:
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/asm-show-inst.ll.expected
  llvm/utils/UpdateTestChecks/common.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125405.428712.patch
Type: text/x-patch
Size: 7870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220511/dbdd477e/attachment.bin>


More information about the llvm-commits mailing list