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

Constant-fold for the type-casting in switch-case labels #5436

Conversation

jkwak-work
Copy link
Collaborator

Closes #5372

When the expresion used as a switch-case labels is a type-casting from floating-point type to an integer type, the floating-point literal also need to be constant-folded.

@jkwak-work jkwak-work added the pr: non-breaking PRs without breaking changes label Oct 29, 2024
@jkwak-work jkwak-work self-assigned this Oct 29, 2024
When the expresion used as a switch-case labels is a type-casting from
floating-point type to an integer type, the floating-point literal also
need to be constant-folded.
@jkwak-work jkwak-work force-pushed the fix/constant_folding_on_switch_case_label_not_working branch from 9dbd68c to af40659 Compare October 30, 2024 16:16
csyonghe
csyonghe previously approved these changes Oct 30, 2024
Copy link
Collaborator

@csyonghe csyonghe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can post "/format" in the thread to let the bot format the change for you.

@jkwak-work
Copy link
Collaborator Author

/format

@slangbot
Copy link
Contributor

🌈 Formatted, please merge the changes from this PR

…_on_switch_case_label_not_working

Format code for PR shader-slang#5436
@csyonghe csyonghe merged commit 1487a1f into shader-slang:master Oct 31, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CTS] constant-folding not working for the switch-case labels
3 participants