------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-01 12:38 ------- I have a patch that for
int a,b; void foo(void) { int x; if (a<b) x=a,a=b,b=x; } produces bar: movl a, %eax movl b, %edx cmpl %edx, %eax movl %eax, %ecx cmovl %edx, %ecx cmovge b, %eax movl %ecx, a movl %eax, b ret but it produces horrible code if the stuff is not available in pseudos already. (i.e. we miss load/store sinking) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22568