summaryrefslogtreecommitdiff
path: root/tests/bugs/gh-3637.slang
AgeCommit message (Collapse)Author
2024-03-26Fix the sign-extending issue in right shift (#3820)kaizhangNV
Fix issue (#3637). In constant folding of a right shift operation,slang always uses signed interger as the operand no matter the input source code is signed or unsigned, this could causes sign-extending issue if the input source is unsigned integer with highest bit set to 1. Fix the issue by checking the original type of the input and use the unsigned type if the input is unsigned.