[clang] [llvm] [IR] Add fast-math support to {u,s}itofp (PR #198470)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 3 23:11:35 PDT 2026
================
@@ -1815,6 +1815,13 @@ static uint64_t getOptimizationFlags(const Value *V) {
Flags |= bitc::AllowContract;
if (FPMO->hasApproxFunc())
Flags |= bitc::ApproxFunc;
+
+ // Handle uitofp.
+ if (const auto *NNI = dyn_cast<PossiblyNonNegInst>(V)) {
+ Flags <<= 1;
----------------
paperchalice wrote:
Unfortunately, it offends bitcode compatibility policy, from LLVM Developer Policy:
> - The textual format is not backwards compatible. We don’t change it too often, but there are no specific promises.
> - The current LLVM version supports loading any bitcode since version 3.0.
https://github.com/llvm/llvm-project/pull/198470
More information about the cfe-commits
mailing list