Hello! For the DF->SI testcases like this: int test1(double a) { return sin(a); } current mainline gcc produces following code for -march=pentium4: ... fsin fstpl (%esp) movsd (%esp), %xmm0 cvttsd2si %xmm0, %eax ... ret At least for pentium4 (and perhaps other !TARGET_K8 targets), xmm register could be avoided, as cvttsd2si can convert directly from memory to integer register. Attached patch introduces a couple of peephole2 optimizers to get rid of extra movsd. Unfortunatelly, combine pass can't be used in this case, because all necessary moves are generated in greg pass _after_ combine. With attached patch, gcc generates following code: test1: subl $12, %esp fldl 16(%esp) fsin fstpl (%esp) cvttsd2si (%esp), %eax addl $12, %esp ret BTW: A small bug was fixed: *fix_trunchi_1 should have its split constraint defined. Bootstrapped on i686-pc-linux-gnu, regtest in progres, c and c++. 2004-10-18 Uros Bizjak * config/i386/i386.md (fix_truncsfdi_sse, fix_truncdfdi_sse, fix_truncsfsi_sse, fix_truncdfsi_sse): Add peephole2 optimizers to avoid mem->sse_reg->reg in FP->int conversions for !TARGET_K8. (*fix_trunchi_1): Add "&& 1" as split constraint. Uros.