-
Notifications
You must be signed in to change notification settings - Fork 35
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
Fix for spir-v translation to IR for OpPtrAccessChain #173
Merged
coldav
merged 1 commit into
uxlfoundation:main
from
coldav:colin/fix_spirv_op_ptr_access_chain
Oct 24, 2023
Merged
Fix for spir-v translation to IR for OpPtrAccessChain #173
coldav
merged 1 commit into
uxlfoundation:main
from
coldav:colin/fix_spirv_op_ptr_access_chain
Oct 24, 2023
Conversation
This file contains 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
coldav
force-pushed
the
colin/fix_spirv_op_ptr_access_chain
branch
from
October 23, 2023 15:17
6c8dc21
to
21c2580
Compare
RossBrunton
approved these changes
Oct 23, 2023
frasercrmck
reviewed
Oct 23, 2023
modules/compiler/spirv-ll/test/spvasm/op_ptr_access_chain.spvasm
Outdated
Show resolved
Hide resolved
hvdijk
reviewed
Oct 23, 2023
I think styling |
coldav
force-pushed
the
colin/fix_spirv_op_ptr_access_chain
branch
2 times, most recently
from
October 23, 2023 17:01
f3d75eb
to
0e43df2
Compare
frasercrmck
reviewed
Oct 23, 2023
coldav
force-pushed
the
colin/fix_spirv_op_ptr_access_chain
branch
3 times, most recently
from
October 24, 2023 09:49
707e570
to
62f1714
Compare
frasercrmck
reviewed
Oct 24, 2023
In some cases the indexes field for OpPtrAccessChain can be empty. The translation code currently assumes this not to be the case and checks for element decorations. This fixes the empty index case by not checking the decorations in this case. There are some issues with OpMemberDecorate, so testing of the path with additional arguments requiring decorations will not be tested here. Also some previous clang-format issues have been resolved.
coldav
force-pushed
the
colin/fix_spirv_op_ptr_access_chain
branch
from
October 24, 2023 10:28
62f1714
to
55beb04
Compare
frasercrmck
approved these changes
Oct 24, 2023
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.
Looks good. It might be worth adding LIT tests for the other nodes with optional index lists that call checkMemberDecorations
, but that could also come later.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
Fix for spir-v translation to IR for OpPtrAccessChain
Reason for change
In some cases the indexes field for OpPtrAccessChain can be empty. The translation code currently assumes this not to be the case and checks for element decorations, resulting in a segmentation fault during SYCL CTS testing.
Description of change
This fixes the empty index case by not checking the decorations in this case. There are some issues with OpMemberDecorate, so testing of the path with additional arguments requiring decorations will not be tested here.
Also some previous clang-format issues have been resolved.
Additional lit tests have been added.