search for: cannotbenegativezero

Displaying 6 results from an estimated 6 matches for "cannotbenegativezero".

2015 Jan 08
3
[LLVMdev] Floating-point range checks
.... Generally, something like this would existing in InstCombine and ValueTracking. Take a look at ComputeSignBit in ValueTracking.cpp. This doesn't apply (?) to floating point numbers, but we'd need something equivalent for them. It looks like there may already be a start in the form of: CannotBeNegativeZero Other places to look would be SimplifyFAdd and InstCombine::visitFAdd. For this particular example, you're probably going to want a pattern in SimplifyFCmp of the form: matcher: sqrt_call( fadd(Value(X), SpecificValue(X)), fadd(Value(Y), SpecificValue(Y))) && CannotBeNegativeZero(X) &...
2015 Jan 07
2
[LLVMdev] Floating-point range checks
The Julia language implements sqrt(x) with conditional branch taken if x<0. Alas this prevents vectorization of loops with sqrt. Often the argument can be proven to be non-negative. E.g., sqrt(x*x+y*y). Is there an existing LLVM pass or analysis that does floating-point range propagation to eliminate such unnecessary checks? Arch D. Robison Intel Corporation -------------- next part
2015 Jan 08
2
[LLVMdev] Floating-point range checks
...is would existing in InstCombine and > ValueTracking. > > Take a look at ComputeSignBit in ValueTracking.cpp. This doesn't apply > (?) to floating point numbers, but we'd need something equivalent for > them. It looks like there may already be a start in the form of: > CannotBeNegativeZero > > Other places to look would be SimplifyFAdd and InstCombine::visitFAdd. > > For this particular example, you're probably going to want a pattern > in SimplifyFCmp of the form: > matcher: sqrt_call( fadd(Value(X), SpecificValue(X)), fadd(Value(Y), > SpecificValue(Y)))...
2015 Jan 08
2
[LLVMdev] Floating-point range checks
...gt;> >>> Take a look at ComputeSignBit in ValueTracking.cpp. This doesn't >>> apply >>> (?) to floating point numbers, but we'd need something equivalent >>> for >>> them. It looks like there may already be a start in the form of: >>> CannotBeNegativeZero >>> >>> Other places to look would be SimplifyFAdd and >>> InstCombine::visitFAdd. >>> >>> For this particular example, you're probably going to want a >>> pattern >>> in SimplifyFCmp of the form: >>> matcher: sqrt_call( fa...
2015 Jan 08
2
[LLVMdev] Floating-point range checks
...look at ComputeSignBit in ValueTracking.cpp. This doesn't > >>> apply > >>> (?) to floating point numbers, but we'd need something equivalent > >>> for them. It looks like there may already be a start in the form > >>> of: > >>> CannotBeNegativeZero > >>> > >>> Other places to look would be SimplifyFAdd and > >>> InstCombine::visitFAdd. > >>> > >>> For this particular example, you're probably going to want a > >>> pattern in SimplifyFCmp of the form: > >>&gt...
2015 Jan 13
2
[LLVMdev] Floating-point range checks
...* %3, i32 2) unreachable pass: ; preds = %top %4 = call float @llvm.sqrt.f32(float %1) ret float %4 } I just want to fold the branch. Following Philip’s earlier suggestion, adding a routine CannotBeOrderedLessThanZero (that’s analogous to CannotBeNegativeZero) and making SimplifyFCmpInst use it would be enough to cover the cases of primary interest. Comments? - Arch -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150113/403987d3/attachment.html>