Optimize a?true/false:b and a?b:true/false patterns coming from CASE

Those patterns often appear from optiq's case translation.