Reduce the value of the switch statement to a IR::Temp.

This will avoid multiple evaluation of the condition.