[llvm] [GlobalISel] Add G_ABS computeKnownBits, add ComputeKnownBitsCache assertion to computeNumSignBits (PR #154413)

Pragyansh Chaturvedi via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 1 03:26:35 PDT 2025


r41k0u wrote:

I have added more tests and a fix for the cache assertion. If you think I should move it to `GISelValueTrackingPrinterPass::run`, something like this:
```
assert(VTA.ComputeKnownBitsCache.empty() && "Cache should have been cleared");
KnownBits Known = VTA.getKnownBits(Reg);
unsigned SignedBits = VTA.computeNumSignBits(Reg);
ComputeKnownBitsCache.clear();
```
instead of what I have done right now, please let me know and I'll change it. 

https://github.com/llvm/llvm-project/pull/154413


More information about the llvm-commits mailing list