[llvm] [SimplifyLibCalls] Constant fold nan libcall (PR #101459)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 00:33:43 PDT 2024
================
@@ -3858,6 +3858,22 @@ Value *LibCallSimplifier::optimizeStringMemoryLibCall(CallInst *CI,
return nullptr;
}
+/// Constant folding nan/nanf/nanl.
+static Value *optimizeNaN(CallInst *CI) {
+ StringRef CharSeq;
+ if (!getConstantStringInfo(CI->getArgOperand(0), CharSeq))
+ return nullptr;
+
+ llvm::APInt Fill;
----------------
nikic wrote:
```suggestion
APInt Fill;
```
https://github.com/llvm/llvm-project/pull/101459
More information about the llvm-commits
mailing list