-
Notifications
You must be signed in to change notification settings - Fork 15k
[UpdateTestChecks] Don't fail silently when conflicting CHECK lines means no checks are generated for some functions #159321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
asb
merged 10 commits into
llvm:main
from
asb:2025q3-update-llc-test-checks-conflict-improvement
Sep 23, 2025
Merged
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a3bd517
[UpdateTestChecks] Don't fail silently when conflicting CHECK lines m…
asb 3d8c2a8
Apply reformatting suggested by darker
asb be93e6e
Address review comments
asb 66ba467
Merge remote-tracking branch 'origin/main' into 2025q3-update-llc-tes…
asb c3cc1ba
Check full warning in conflicting-prefixes.test
asb 4ca0f22
Avoid double not
asb e8ffdc9
Add test case that checks we don't print false positive warning when …
asb 7e47a56
Attempt to fix darker code formatting issues
asb 327c1ba
Merge remote-tracking branch 'origin/main' into 2025q3-update-llc-tes…
asb bdbcc77
Merge branch 'main' into 2025q3-update-llc-test-checks-conflict-impro…
asb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/conflicting-prefixes.ll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| ; RUN: sed 's/RETVAL/1/g' %s | llc -mtriple=riscv32 \ | ||
| ; RUN: | FileCheck -check-prefixes=CHECK,CHECKA %s | ||
| ; RUN: sed 's/RETVAL/2/g' %s | llc -mtriple=riscv32 \ | ||
| ; RUN: | FileCheck -check-prefixes=CHECK,CHECKA %s | ||
| ; RUN: sed 's/RETVAL/3/g' %s | llc -mtriple=riscv32 \ | ||
| ; RUN: | FileCheck -check-prefixes=CHECK,CHECKB %s | ||
| ; RUN: sed 's/RETVAL/4/g' %s | llc -mtriple=riscv32 \ | ||
| ; RUN: | FileCheck -check-prefixes=CHECK,CHECKB %s | ||
|
|
||
| define i32 @foo() { | ||
| ret i32 RETVAL | ||
| } | ||
|
|
||
| define i32 @bar() { | ||
| ret i32 100 | ||
| } |
21 changes: 21 additions & 0 deletions
21
...est/tools/UpdateTestChecks/update_llc_test_checks/Inputs/conflicting-prefixes.ll.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --no-generate-body-for-unused-prefixes | ||
| ; RUN: sed 's/RETVAL/1/g' %s | llc -mtriple=riscv32 \ | ||
| ; RUN: | FileCheck -check-prefixes=CHECK,CHECKA %s | ||
| ; RUN: sed 's/RETVAL/2/g' %s | llc -mtriple=riscv32 \ | ||
| ; RUN: | FileCheck -check-prefixes=CHECK,CHECKA %s | ||
| ; RUN: sed 's/RETVAL/3/g' %s | llc -mtriple=riscv32 \ | ||
| ; RUN: | FileCheck -check-prefixes=CHECK,CHECKB %s | ||
| ; RUN: sed 's/RETVAL/4/g' %s | llc -mtriple=riscv32 \ | ||
| ; RUN: | FileCheck -check-prefixes=CHECK,CHECKB %s | ||
|
|
||
| define i32 @foo() { | ||
| ret i32 RETVAL | ||
| } | ||
|
|
||
| define i32 @bar() { | ||
| ; CHECK-LABEL: bar: | ||
| ; CHECK: # %bb.0: | ||
| ; CHECK-NEXT: li a0, 100 | ||
| ; CHECK-NEXT: ret | ||
| ret i32 100 | ||
| } |
7 changes: 7 additions & 0 deletions
7
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/conflicting-prefixes.test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # REQUIRES: riscv-registered-target | ||
|
|
||
| # RUN: cp -f %S/Inputs/conflicting-prefixes.ll %t.ll | ||
| # RUN: %update_llc_test_checks --no-generate-body-for-unused-prefixes %t.ll 2>&1 | FileCheck %s | ||
| # RUN: diff -u %S/Inputs/conflicting-prefixes.ll.expected %t.ll | ||
|
|
||
| # CHECK: WARNING: For function 'foo', the following RUN lines will not generate checks due to conflicting output | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.