search for: scevsmaxexpr

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

2009 Jun 24
1
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...the Scalar Evolution pass. Here are the pseudo-code of the implementation: const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase); const SCEV * bounds = SE->getSCEV(objSize); if (SE->getSMaxExpr(offset, bounds) == bounds) { ++safeGEPs; } But it turns out that SCEVSMaxExpr does not handle the case of SMax(N, N-2). My question is, is there a plan to support something like this, or is it possible to do some refactoring to enhance the capability of Scalar Evolution? I notice that Scalar Evolution, Instruction Combining and Memory Dependence Analysis require sort of eva...
2009 Jun 24
2
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...; > const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase); > > const SCEV * bounds = SE->getSCEV(objSize); > > > > if (SE->getSMaxExpr(offset, bounds) == bounds) { > > ++safeGEPs; > > } > > > > But it turns out that SCEVSMaxExpr does not handle the case of SMax(N, > > N-2). > > Consider 8-bit integers and N = -127. N-1 equals INT_MIN and N-2 then is > equal to INT_MAX, or 127. In that case, the SMax would equal N-2, not N. > > In other cases (like N = 2) the SMax would equal N, not N-2. > > B...
2009 Jun 24
0
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...do-code of the implementation: > > const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase); > const SCEV * bounds = SE->getSCEV(objSize); > > if (SE->getSMaxExpr(offset, bounds) == bounds) { > ++safeGEPs; > } > > But it turns out that SCEVSMaxExpr does not handle the case of SMax(N, > N-2). Consider 8-bit integers and N = -127. N-1 equals INT_MIN and N-2 then is equal to INT_MAX, or 127. In that case, the SMax would equal N-2, not N. In other cases (like N = 2) the SMax would equal N, not N-2. Because of this, we cannot reduce this SM...
2009 Jun 24
4
[LLVMdev] killing vicmp and vfcmp
Now that icmp and fcmp have supported returning vectors of i1 for a while, I think it's time to remove the vicmp and vfcmp instructions from LLVM. The good news is that we've never shipped a release that included them so we won't be providing auto-upgrade support. There is some existing backend support for vicmp and vfcmp that looks different from what icmp and fcmp do. If this
2009 Jun 24
0
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...gt;getMinusSCEV(SE->getSCEV(GEP), GEPBase); > > > const SCEV * bounds = SE->getSCEV(objSize); > > > > > > if (SE->getSMaxExpr(offset, bounds) == bounds) { > > > ++safeGEPs; > > > } > > > > > > But it turns out that SCEVSMaxExpr does not handle the case of SMax(N, > > > N-2). > > > > Consider 8-bit integers and N = -127. N-1 equals INT_MIN and N-2 then is > > equal to INT_MAX, or 127. In that case, the SMax would equal N-2, not N. > > > > In other cases (like N = 2) the SMax would...
2009 Jun 24
1
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...EV(SE->getSCEV(GEP), GEPBase); >>>> const SCEV * bounds = SE->getSCEV(objSize); >>>> >>>> if (SE->getSMaxExpr(offset, bounds) == bounds) { >>>> ++safeGEPs; >>>> } >>>> >>>> But it turns out that SCEVSMaxExpr does not handle the case of SMax(N, >>>> N-2). >>> Consider 8-bit integers and N = -127. N-1 equals INT_MIN and N-2 then is >>> equal to INT_MAX, or 127. In that case, the SMax would equal N-2, not N. >>> >>> In other cases (like N = 2) the SMax woul...