[llvm] [InstCombine] Fold fmod to frem if we know it does not set errno. (PR #107912)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 11 03:38:04 PDT 2024
================
@@ -2278,8 +2278,8 @@ Value *LibCallSimplifier::replacePowWithSqrt(CallInst *Pow, IRBuilderBase &B) {
// pow(-Inf, 0.5) is optionally required to have a result of +Inf (not setting
// errno), but sqrt(-Inf) is required by various standards to set errno.
if (!Pow->doesNotAccessMemory() && !Pow->hasNoInfs() &&
- !isKnownNeverInfinity(Base, 0,
- SimplifyQuery(DL, TLI, /*DT=*/nullptr, AC, Pow)))
+ !isKnownNeverInfinity(
+ Base, 0, SimplifyQuery(DL, TLI, DT, AC, Pow, true, true, DC)))
----------------
arsenm wrote:
Passing in the new analyses are a separate patch
https://github.com/llvm/llvm-project/pull/107912
More information about the llvm-commits
mailing list