Details
Details
Diff Detail
Diff Detail
Event Timeline
| llvm/lib/Analysis/ValueTracking.cpp | ||
|---|---|---|
| 3844 | Don't we need to check that the input is non-zero to guard against log(0) --> -inf? This should not fold? define i1 @isKnownNeverNegInfinity_log(double %x) {
%a = call ninf double @llvm.sqrt.f64(double %x) ; could be 0.0
%e = call double @llvm.log.f64(double %a) ; log(0.0) --> -inf
%r = fcmp une double %e, 0xfff0000000000000
ret i1 %r
} | |
| llvm/lib/Analysis/ValueTracking.cpp | ||
|---|---|---|
| 3844 | Yes, I was thinking cannotBeOrderedLessThanZeroImpl would catch it but we're missing the known-never-0 API. I want to merge all of these into one knownFPClass API which would help catch this | |
Don't we need to check that the input is non-zero to guard against log(0) --> -inf?
This should not fold?
define i1 @isKnownNeverNegInfinity_log(double %x) { %a = call ninf double @llvm.sqrt.f64(double %x) ; could be 0.0 %e = call double @llvm.log.f64(double %a) ; log(0.0) --> -inf %r = fcmp une double %e, 0xfff0000000000000 ret i1 %r }