Merge pull request #2841 from yebblies/issue11565

Issue 11565 - [Optimizer] Zeroes out the higher 32bits of register in ?: expression