Refactor truncdfsf2.

Patch by: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D3888