[llvm] [ConstantFolding] Implement canConstantFoldCallTo() using TLI (PR #221903)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 00:58:49 PDT 2026
================
@@ -2109,89 +2120,106 @@ bool llvm::canConstantFoldCallTo(const CallBase *Call, const Function *F) {
if (F->getIntrinsicID() != Intrinsic::not_intrinsic)
return canConstantFoldIntrinsic(F->getIntrinsicID(), Call->isStrictFP());
- if (!F->hasName() || Call->isStrictFP())
+ if (!TLI || !F->hasName() || Call->isStrictFP())
----------------
antoniofrighetto wrote:
Should be no longer needed?
```suggestion
if (!TLI || Call->isStrictFP())
```
https://github.com/llvm/llvm-project/pull/221903
More information about the llvm-commits
mailing list