|
|
| Bugzilla Link |
4040 |
| Resolution |
FIXED |
| Resolved on |
Apr 25, 2009 13:34 |
| Version |
trunk |
| OS |
All |
| Attachments |
Overly-simple test and fix |
| Reporter |
LLVM Bugzilla Contributor |
Extended Description
Calls like APInt(1, "1", 1, 10) fail the assert that ((slen*64)/22 <= numbits. I ran into this in code that llc -march=cpp emits.
I've attached a patch with a test for this kind of case and the simplest fix that could possibly work. I just subtract one from slen before checking if it's too big for the number of bits. You probably actually want better a test and fix, but this should capture the idea.
Extended Description
Calls like APInt(1, "1", 1, 10) fail the assert that ((slen*64)/22 <= numbits. I ran into this in code that llc -march=cpp emits.
I've attached a patch with a test for this kind of case and the simplest fix that could possibly work. I just subtract one from slen before checking if it's too big for the number of bits. You probably actually want better a test and fix, but this should capture the idea.