Try to do some comparisons and nan creations in llvm

Try to do some comparisons and nan creations in llvm instead of calling c functions. Comparisons between two nans don't quite work right yet, but good enough for benchmarks.