search for: newupper

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

Did you mean: newspaper
2011 Jun 22
2
[LLVMdev] ConstantRange::sub
Sure. I will submit a patch. BTW, what's the difference between the bounds I was expecting APInt NewLower = getLower() - Other.getUpper() + 1; APInt NewUpper = getUpper() - Other.getLower(); and the two you mentioned NewLower = Lower - (Upper-1) NewUpper = (Upper-1) - Lower + 1 They look equivalent to me. Did I miss anything? Thanks. - xi On Jun 22, 2011, at 2:39 PM, Nick Lewycky wrote: > Thanks, I think you've found a serious bug! >...
2011 Jun 22
0
[LLVMdev] ConstantRange::sub
On 22 June 2011 12:51, Xi Wang <xi.wang at gmail.com> wrote: > Sure. I will submit a patch. > > BTW, what's the difference between the bounds I was expecting > > APInt NewLower = getLower() - Other.getUpper() + 1; > APInt NewUpper = getUpper() - Other.getLower(); > > and the two you mentioned > > NewLower = Lower - (Upper-1) > NewUpper = (Upper-1) - Lower + 1 > > They look equivalent to me. Did I miss anything? Thanks. > ... they are. Sorry, I was just surprised to see the +1 on the NewLower (it al...
2011 Jun 21
2
[LLVMdev] ConstantRange::sub
Hi, I have a question about ConstantRange::sub(const ConstantRange &Other) at lib/Support/ConstantRange.cpp:524. The code computes the new bounds as follows. APInt NewLower = getLower() - Other.getLower(); APInt NewUpper = getUpper() - Other.getUpper() + 1; Could someone explain this to me? I was expecting something like APInt NewLower = getLower() - Other.getUpper() + 1; APInt NewUpper = getUpper() - Other.getLower(); Thanks. - xi
2011 Jun 22
0
[LLVMdev] ConstantRange::sub
...ang <xi.wang at gmail.com> wrote: > Hi, > > I have a question about ConstantRange::sub(const ConstantRange &Other) at > lib/Support/ConstantRange.cpp:524. The code computes the new bounds as > follows. > > APInt NewLower = getLower() - Other.getLower(); > APInt NewUpper = getUpper() - Other.getUpper() + 1; > > Could someone explain this to me? I was expecting something like > > APInt NewLower = getLower() - Other.getUpper() + 1; > APInt NewUpper = getUpper() - Other.getLower(); > These aren't quite right, I think it should be: NewLower =...
2009 Jul 11
0
[LLVMdev] review request for patch
Hi Ryan, In this case there already is an implementation for this, it's just hard to find being in the internals of the LoopVR pass. I'm planning to pull the multiply and udiv support out of there. Your patch looks good but beyond what Dan mentioned you have a bug calculating NewUpper: the constant ranges are half-open intervals where "[5, 10)" includes the value 9 but not 10. This means you need to subtract 1 before multiplying the uppers then add one on when you're done otherwise you end up with [5, 11) * [1, 3) = [5, 33) when it should equal [5, 21). Nick...
2009 Jul 11
2
[LLVMdev] review request for patch
On Fri, Jul 10, 2009 at 8:35 PM, Dan Gohman<gohman at apple.com> wrote: > > > On Jul 10, 2009, at 2:03 PM, Ryan Flynn <parseerror at gmail.com> wrote: > >> I've addressed a "TODO" in ConstantRange and several in its unit test >> by implementing a stricter "multiply" method (it had been returning a >> "full" set for