[InstSimplify] add constant folding for fdiv/frem

Also, add a helper function so we don't have to repeat this code for each binop.

llvm-svn: 299309
2 files changed