On Mon, Nov 11, 2013 at 12:26:09PM +0100, Richard Biener wrote: > The question is whether you for example want to handle > > a_2 = 1 + 0; > > at RTL expansion time? I'd say it's better to have
I think we already handle that just fine, there are tons of various simplify_gen_* calls during expansion, and we know there the mode etc. Just Joern hit a place which wasn't prepared to handle it properly, so either we handle it as you are suggesting by forcing one of the constants into a register, or we simplify the comparison and if it simplifies into a constant, we transform it to something simpler. Jakub