The logic here is the same for normal (sub X, Y), so just reused
isNonZeroSub.
Alive2 Link:
https://alive2.llvm.org/ce/z/9kSkMv
Paths
| Differential D149412
[ValueTracking] Add logic for `isKnownNonZero(ssub.sat X, Y)` ClosedPublic Authored by goldstein.w.n on Apr 27 2023, 11:20 PM.
Details Summary The logic here is the same for normal (sub X, Y), so just reused Alive2 Link: https://alive2.llvm.org/ce/z/9kSkMv
Diff Detail
Event Timelinegoldstein.w.n added a parent revision: D149411: [ValueTracking] Add logic for `isKnownNonZero(sshl.sat/ushl.sat X, Y)`.Apr 27 2023, 11:26 PM goldstein.w.n added a child revision: D149413: [ValueTracking] Add logic for `isKnownNonZero(usub.sat X, Y)`. Comment Actions LGTM. It looks like we're missing the corresponding InstCombine for this: https://alive2.llvm.org/ce/z/hLC6aQ This revision is now accepted and ready to land.Apr 28 2023, 5:46 AM Comment Actions
Will post patch for that tomorrow. Comment Actions
See: D149521 goldstein.w.n added a child revision: D149414: [ValueTracking] Add logic for `isKnownNonZero(sadd.sat X, Y)`.Apr 29 2023, 3:03 PM goldstein.w.n removed a child revision: D149413: [ValueTracking] Add logic for `isKnownNonZero(usub.sat X, Y)`. Closed by commit rG461ded463107: [ValueTracking] Add logic for `isKnownNonZero(ssub.sat X, Y)` (authored by goldstein.w.n). · Explain WhyApr 30 2023, 8:07 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 518322 llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Analysis/ValueTracking/known-non-zero.ll
|