Skip to content
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

Generate poison values instead of undef in reverse translation to align with the LLVM community #2953

Open
vmaksimo opened this issue Jan 9, 2025 · 0 comments · May be fixed by #2960
Open

Comments

@vmaksimo
Copy link
Contributor

vmaksimo commented Jan 9, 2025

Undef is now deprecated and should be used only to represent loads of uninitialized memory.

https://llvm.org/docs/UndefinedBehavior.html
https://llvm.org/docs/LangRef.html#undefined-values

vmaksimo added a commit to vmaksimo/SPIRV-LLVM-Translator that referenced this issue Jan 10, 2025
In reverse translation always use `poison` values except cases where we
translate `OpUndef`. In other cases common sense helped to define where
it is safe to replace `undef` to `poison` (e.g. in creating structions,
regularization passes).

This resolves KhronosGroup#2953 and aligns us with the LLVM community in terms of
generating IR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant