Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
2839–2840 | Can we directly return isNonZeroAdd? |
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
2839–2840 | No, we actually benefit from compute known bits. Take the following. X[0] == 0 and Y[0] == 1. The result will be odd (from computeknownbits) so non-zero, but we don't get that here (would need to replicate computeknownnbits to do that). |
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
2839–2840 | Okay, can we then just call KnownBits::computeForAddSub(...).isNonZero() at the end? After all we already calculated known bits for both operands, so no point in calculating them again via the generic code. |
Can we directly return isNonZeroAdd?