If a branch is conditional on extractvalue(op.with.overflow(%x, C), 1) then we can constrain the value of %x inside the branch based on makeGuaranteedNoWrapRegion(). We do this by extending the edge-value handling in LVI. This allows CVP to then fold comparisons against %x, as illustrated in the tests.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I haven't looked at LVI much, but judging from the git log, nobody else has done that recently either.
The logic looks right, and the tests are great. LGTM.
llvm/lib/Analysis/LazyValueInfo.cpp | ||
---|---|---|
1140 ↗ | (On Diff #195461) | I see that the lower-case variable "isTrueDest" is carried over from existing code, but I think it should be changed to conform with the current guidelines and the formatting of other variables (unless the lowerCamelCase proposal is going forward...). |