------- Comment #10 from hubicka at gcc dot gnu dot org 2005-10-31 20:55 ------- Jeff, you missed the propagation DOM makes that hurts register allocation indpeendently on whether code sinking does or does not it's job. In reality code sinking (that appeared in GCC after I reported the bug) improves the code as we create conditional move: [EMAIL PROTECTED]:/aux/hubicka/gcc/build/gcc$ ./xgcc -B ./ -O2 ~/nodom.c ; time ./a.out ; time ./a.out
real 0m0.698s user 0m0.695s sys 0m0.001s real 0m0.698s user 0m0.698s sys 0m0.000s [EMAIL PROTECTED]:/aux/hubicka/gcc/build/gcc$ ./xgcc -B ./ -O2 ~/nodom.c -fno-tree-sink; time ./a.out ; time ./a.out real 0m0.762s user 0m0.760s sys 0m0.001s real 0m0.763s user 0m0.761s sys 0m0.001s [EMAIL PROTECTED]:/aux/hubicka/gcc/build/gcc$ ./xgcc -B ./ -O2 ~/nodom.c -fno-tree-dominator-opts -fno-tree-sink; time ./a.out ; time ./a.out real 0m0.740s user 0m0.736s sys 0m0.001s real 0m0.737s user 0m0.736s sys 0m0.002s [EMAIL PROTECTED]:/aux/hubicka/gcc/build/gcc$ ./xgcc -B ./ -O2 ~/nodom.c -fno-tree-dominator-opts; time ./a.out ; time ./a.out real 0m0.574s user 0m0.573s sys 0m0.001s real 0m0.580s user 0m0.574s sys 0m0.002s -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23181