[all-commits] [llvm/llvm-project] b0e600: [InstCombine] Add additional tests for known non z...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Fri Dec 25 07:58:17 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: b0e6007c8254811a5828c1a253a615e45359c653
https://github.com/llvm/llvm-project/commit/b0e6007c8254811a5828c1a253a615e45359c653
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2020-12-25 (Fri, 25 Dec 2020)
Changed paths:
M llvm/test/Transforms/InstCombine/known-non-zero.ll
Log Message:
-----------
[InstCombine] Add additional tests for known non zero (NFC)
Check conditions that imply non-zero, even if they are not literally
"x != 0".
Using ctlz for testing, as explicit comparison might get folded by
other reasoning.
Commit: 35676a4f9a536a2aab768af63ddbb15bc722d7f9
https://github.com/llvm/llvm-project/commit/35676a4f9a536a2aab768af63ddbb15bc722d7f9
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2020-12-25 (Fri, 25 Dec 2020)
Changed paths:
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/test/Transforms/Attributor/nonnull.ll
M llvm/test/Transforms/InstCombine/known-non-zero.ll
Log Message:
-----------
[InstCombine] Generalize icmp handling in isKnownNonZero()
The dominating condition handling in isKnownNonZero() currently
only takes into account conditions of the form "x != 0" or "x == 0".
However, there are plenty of other conditions that imply non-zero,
a common one being "x s> 0".
Peculiarly, the handling for assumes was already dealing with more
general non-zero-ness conditions, so this just reuses the same
logic for the dominating condition case.
Compare: https://github.com/llvm/llvm-project/compare/a3614a31c46a...35676a4f9a53
More information about the All-commits
mailing list