This patch is in a series of patches to provide builtins for compatibility with
the XL compiler. This patch adds software divide builtins with checking.
Thank you, I see what you mean. I have changed it to emit a fdiv ninf arcp instead of a fdiv fast. I included the ninf flag because without it the compiler doesn't produce the software div estimate.
ninf is also an issue, although maybe less likely to bite in practice. Consider what happens if someone passes infinity to swdivs: the fdiv reduces to poison, so the branch is undefined behavior.