[clang] [llvm] [IR] Add fast-math support to {u,s}itofp (PR #198470)

Jay Foad via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 4 04:38:28 PDT 2026


jayfoad wrote:

> nsz on fptoui wouldn't have any effect, because fptoui 0.0 and fptoui -0.0 both produce the same value. It does need to be on the uitofp, it just can't use our standard semantics...

OK, I think I follow. That should be called out in the documentation for this patch.

> So `contract + nsz` would be better?

No, `contract` should be reserved for cases where combining two operations eliminates an intermediate rounding step.

https://github.com/llvm/llvm-project/pull/198470


More information about the cfe-commits mailing list