[PATCH] D142832: [ValueTracking] Add support in `isKnownNonZero` for dominating condition from `X > C1 && X < C2`

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 28 20:59:03 PST 2023


goldstein.w.n created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
goldstein.w.n requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

`X > C1 && X < C2` is canonicalized to `X + C3 < C4`, so look through
`X + C` to try and find compares.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142832

Files:
  llvm/include/llvm/IR/InstrTypes.h
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/IR/Instructions.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
  llvm/test/Analysis/ValueTracking/known-non-zero-range.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142832.493065.patch
Type: text/x-patch
Size: 7025 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230129/047e838f/attachment.bin>


More information about the llvm-commits mailing list