Maybe everyone else manages to get good code without something like TER.
That's because we lack other things that people have, like a sane instruction selection and expression reordering pass: other compilers probably have something akin to TER as part of instruction selection. Like many other parts of GCC (right Steven? ;-) TER is not evil by itself -- it is as part of IR lowering.
I think Zdenek's patch is fine, because *everything* in TER is a hack.
Zdenek, maybe you could you try and see if enabling pre-regalloc scheduling would also make this particular problem you're seeing go away, just as an experiment...
Couldn't it also make it much worse? Paolo