-
Notifications
You must be signed in to change notification settings - Fork 220
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
[DebugInfo] Fix instruction enumeration #2248
base: main
Are you sure you want to change the base?
Conversation
I'm new to this repo so I don't know how best to test this. This isn't a bug that is easily observed within the closed-loop |
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.
Thanks for noticing and the patch! It can be tested via adding .spvasm test, calling spirv-as to it and then reverse translating it. Though I personally won't insist on it.
One thing that worries me, that llvm-spirv based SPIR-V consumers, that might be slightly lagging from the trunk will become broken after this fix. Probably it should be fixed on the downstream. Anyway, can we give some graceful period before merging the fix?
Ah yes, good idea!. I'll try my hand at that while I wait for reviews etc.
Yes, I'm a bit worried about that too. I've no idea what's generally done in these situations! I don't think it's possible for downstream consumers to reliably distinguish between these two opcodes, unless the pack has > 1 optional operand, but that could also be seen as an invalid SPIR-V binary. I was also wondering if this sort of thing is back-ported to the older LLVM branches?
That might make sense. What kind of period do you have in mind? I (Codeplay) have an interest in getting this fixed in Intel's DPC++ quite shortly, so I might need to look into patching it "downstream" there first. |
8d98bfa
to
05b639b
Compare
I've added a LIT test. |
These two opcodes were mistakenly swapped when they were originally added, at least according to the `DebugInfo`, `OpenCL.DebugInfo.100`, and `NonSemantic.Shader.DebugInfo.100` extended instruction sets. This might break existing third-party SPIR-V translators if they are accommodating this bug, mistakenly or otherwise.
05b639b
to
2614860
Compare
I've updated the test to remove the invalid The test still isn't |
Closed and reopened to rerun tests. Thanks |
These two opcodes were mistakenly swapped when they were originally added, at least according to the
DebugInfo
,OpenCL.DebugInfo.100
, andNonSemantic.Shader.DebugInfo.100
extended instruction sets.This might break existing third-party SPIR-V translators if they are accommodating this bug, mistakenly or otherwise.