-
Notifications
You must be signed in to change notification settings - Fork 246
Fix MergeBlock error: a merge block for another header #3280
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,10 @@ | ||||||
| ; Test case for OpLoopMerge instruction placement validation. | ||||||
| ; This test verifies that OpLoopMerge instructions are properly placed as the second-to-last | ||||||
| ; instruction in their basic block, immediately preceding the branch instruction. | ||||||
|
|
||||||
| ; RUN: llvm-spirv %S/loopMerge.bc -o %t.spv | ||||||
| ; RUN: spirv-val %t.spv | ||||||
|
|
||||||
| ; RUN: llvm-spirv --to-text %t.spv -o - | FileCheck %s --check-prefix=CHECK-SPIRV-TEXT | ||||||
| ; CHECK-SPIRV-TEXT: LoopMerge | ||||||
| ; CHECK-SPIRV-TEXT: BranchConditional | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please, add newline at end of file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we add
Suggested change
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| ; Test case for OpLoopMerge merge block assignment validation. | ||
| ; This test verifies that OpLoopMerge instructions properly assign unique merge blocks | ||
| ; and don't create conflicts where the same block is used as a merge block for multiple loops. | ||
|
|
||
| ; RUN: llvm-spirv %S/mergeBlock.bc -o %t.spv | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please, add the test contents in plain text in this file and call llvm-as from here. |
||
| ; RUN: spirv-val %t.spv | ||
|
|
||
| ; RUN: llvm-spirv --to-text %t.spv -o - | FileCheck %s --check-prefix=CHECK-SPIRV-TEXT | ||
| ; CHECK-SPIRV-TEXT: LoopMerge | ||
| ; CHECK-SPIRV-TEXT: BranchConditional | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please, add newline at end of file. |
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think these binary file should be removed from the PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and the same for the other .bc file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.