Displaying 3 results from an estimated 3 matches for "floorofquotient".
2012 May 21
3
[LLVMdev] APInt::sdivrem error?
I wrote the following bit of code
static APInt FloorOfQuotient(APInt a, APInt b) {
unsigned bits = a.getBitWidth();
APInt q(bits, 1), r(bits, 1);
APInt::sdivrem(a, b, q, r);
* errs() << "sdivrem(" << a << ", " << b << ") = (" << q << ", " << r <<
")\n";...
2012 May 21
0
[LLVMdev] APInt::sdivrem error?
...difference (note that
several of the correct examples give correct positive and negative
results). And trying it with a 3rd true argument made no difference.
Other ideas anyone?
My only other clue is that bits = 64.
Thanks,
Preston
> I wrote the following bit of code
>
> static APInt FloorOfQuotient(APInt a, APInt b) {
> unsigned bits = a.getBitWidth();
> APInt q(bits, 1), r(bits, 1);
> APInt::sdivrem(a, b, q, r);
> errs() << "sdivrem(" << a << ", " << b << ") = (" << q << ", " << r <<...
2012 May 21
0
[LLVMdev] APInt::sdivrem error?
...-Quotient;
} else {
APInt::udivrem(LHS, RHS, Quotient, Remainder);
}
}
What should I do to submit the correction?
Thanks,
Preston
On Sun, May 20, 2012 at 6:21 PM, Preston Briggs <preston.briggs at gmail.com>
wrote:
> I wrote the following bit of code
>
> static APInt FloorOfQuotient(APInt a, APInt b) {
> unsigned bits = a.getBitWidth();
> APInt q(bits, 1), r(bits, 1);
> APInt::sdivrem(a, b, q, r);
> errs() << "sdivrem(" << a << ", " << b << ") = (" << q << ", " << r <<...