Sorry for leaving this hanging so long. I just refered the double-pecision version(i.e, divdf3) to write this function Since it used 32-bit instead of the highest 8-bit in divdf3, I used 64-bit constant here. http://reviews.llvm.org/D2800