I'm running code that sometimes yields this:
UInt32 current;
int left, right;
...
//sometimes left == right and no shift occurs
current <<= (32 + left - right);
//this works
current <<= (32 - right);
current <<= left;
It appears for any value >= 32, only the value % 32 is shifted. Is there some "optimization" occurring in the framework?