[llvm-branch-commits] [llvm] Update transformations sensitive to signaling NaNs (PR #199557)

Serge Pavlov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed May 27 11:54:23 PDT 2026


================
@@ -126,6 +126,14 @@ struct SimplifyQuery {
   /// Otherwise always return false.
   LLVM_ABI bool isUndefValue(Value *V) const;
 
+  bool expectsSignalingNaNs() const {
+    if (CxtI)
+      if (const BasicBlock *BB = CxtI->getParent())
+        if (const Function *F = BB->getParent())
----------------
spavloff wrote:

Simplified by using `getFunction`.

As `SimplifyQuery` may be used for optimizations before the instruction is created, making `Function*` available as a field in `SimplifyQuery` indeed could be a solution.

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


More information about the llvm-branch-commits mailing list