Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
sbyte comparison broken by optimization #6414
Steps to Reproduce
The following code executes correctly in visual studio and with mono with all optimizations turned off (
On which platforms did you notice this
[ ] macOS
Peanut gallery asks: Can the load/store be removed, but retain casts to the stored/loaded types, and then the casts' presence inhibits the incorrect optimization, unless the sequence of casts is identical on either side, or maybe somehow equivalent. I'm not sure what equivalence is possible, other than identical. Perhaps runs of casts to same type could be removed (int)(int)i == (int)i.