The first cttz(Y) bits in X are translated 1-1 in the output.
Alive2 Links:
https://alive2.llvm.org/ce/z/Qc47p7 https://alive2.llvm.org/ce/z/19ut5H
Paths
| Differential D149421
[KnownBits] Improve `KnownBits::rem(X, Y)` in cases where we can deduce low-bits of output ClosedPublic Authored by goldstein.w.n on Apr 27 2023, 11:22 PM.
Details Summary The first cttz(Y) bits in X are translated 1-1 in the output. Alive2 Links: https://alive2.llvm.org/ce/z/Qc47p7 https://alive2.llvm.org/ce/z/19ut5H
Diff Detail
Event Timelinegoldstein.w.n added a parent revision: D149420: [KnownBits] Add tests for getting lowbits of `rem X, Y`; NFC.Apr 27 2023, 11:28 PM Comment Actions Looks reasonable overall.
goldstein.w.n added inline comments.
Comment Actions How about: KnownBits remGetLowBits(const KnownBits &Known, const KnownBits &LHS, const KnownBits &RHS); Passing with &for mutability is always an odd pattern. Comment Actions
Agreed and done.
Comment Actions
I'm less worried about a correctness failure. Moreso undoing information we could have deduced with unknown state. goldstein.w.n added inline comments.
goldstein.w.n marked an inline comment as done. Comment ActionsCleanup helper now that it returns init state This revision is now accepted and ready to land.May 4 2023, 9:48 AM
This revision was landed with ongoing or failed builds.May 7 2023, 5:12 PM Closed by commit rG7770b0abfdab: [KnownBits] Improve `KnownBits::rem(X, Y)` in cases where we can deduce low… (authored by goldstein.w.n). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 517805 llvm/lib/Support/KnownBits.cpp
llvm/test/Analysis/ScalarEvolution/merge-add-rec-many-inputs.ll
llvm/test/Analysis/ValueTracking/knownbits-rem-lowbits.ll
llvm/test/Transforms/LoopVectorize/AArch64/masked-call.ll
|
Do we need Known?