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

Paul Walker via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue May 26 05:28:08 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())
----------------
paulwalker-arm wrote:

`CxtI` represents a specific point in the program so you should be able to assume the `Function*` is accessible.

Not really for this PR but with this, `vscale_range` and `InstSimplifyFolder` I'm starting to think SimplifyQuery could do with its own `Function*` for cases where an `Instruction*` is not available.

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


More information about the llvm-branch-commits mailing list