<div dir="ltr">Hi LLVM,<div><br></div><div>I have painfully found out that APInt comparison with uint64_t using methods like .ult() is done with the precision of the APInt instance. The uint64_t argument is usually silently truncated then. E.g. APInt{8, 1}.ult(256) is false.</div><div><br></div><div>I propose to change that and do the comparison with 64 bit precision. I think it is much more useful as APInts representing the value of a constant is often compared with the size of a type.</div><div><br></div><div>There are no unit tests for APInt comparisons. I've changed the implementation locally and haven't spot any regressions.</div><div><br></div><div>If the proposal is accepted I will send the patch for review and do self-hosted testing.</div><div><br></div><div>Cheers,</div><div>- PaweÅ‚</div></div>