Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Backport of upstream commit 83a5c7cb62e404a713a35445b755cf0109650279
"[ConstantFolding] Ensure TLI is valid when simplifying fp128 intrinsics"

The inliner's cost analysis calls ConstantFoldCall without a TargetLibraryInfo.
When the host build has logf128, the fp128 folding path dereferences TLI and segfaults.

--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -2124,7 +2124,7 @@
}

LibFunc Fp128Func = NotLibFunc;
- if (TLI->getLibFunc(Name, Fp128Func) && TLI->has(Fp128Func) &&
+ if (TLI && TLI->getLibFunc(Name, Fp128Func) && TLI->has(Fp128Func) &&
Fp128Func == LibFunc_logl)
return ConstantFoldFP128(logf128, Op->getValueAPF(), Ty);
}
2 changes: 1 addition & 1 deletion srcpkgs/llvm19/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'llvm19'
pkgname=llvm19
version=19.1.4
revision=8
revision=9
build_wrksrc=llvm
build_style=cmake
_llvm_prefix=lib/llvm/19
Expand Down
Loading