[all-commits] [llvm/llvm-project] 6749d1: [KnownBits] Add blsi and blsmsk
goldsteinn via All-commits
all-commits at lists.llvm.org
Sat Feb 18 11:31:39 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6749d187c6dfd1b126698e44276bbf1f9050beb8
https://github.com/llvm/llvm-project/commit/6749d187c6dfd1b126698e44276bbf1f9050beb8
Author: Jay Foad <jay.foad at amd.com>
Date: 2023-02-18 (Sat, 18 Feb 2023)
Changed paths:
M llvm/include/llvm/Support/KnownBits.h
M llvm/lib/Support/KnownBits.cpp
M llvm/unittests/Support/KnownBitsTest.cpp
Log Message:
-----------
[KnownBits] Add blsi and blsmsk
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D142519
Commit: c8fb2775cee0e80b07ba99d8f4986c170ff6e2be
https://github.com/llvm/llvm-project/commit/c8fb2775cee0e80b07ba99d8f4986c170ff6e2be
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2023-02-18 (Sat, 18 Feb 2023)
Changed paths:
A llvm/test/Analysis/ValueTracking/knownbits-bmi-pattern.ll
Log Message:
-----------
[ValueTracking] Add tests for known bits after common BMI pattern (blsmsk/blsi); NFC
Differential Revision: https://reviews.llvm.org/D142270
Commit: 9a8f517f5750050e9df4bca332e90d38d075f6a7
https://github.com/llvm/llvm-project/commit/9a8f517f5750050e9df4bca332e90d38d075f6a7
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2023-02-18 (Sat, 18 Feb 2023)
Changed paths:
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/test/Analysis/ValueTracking/knownbits-bmi-pattern.ll
M llvm/test/Transforms/InstCombine/ctpop-pow2.ll
M llvm/test/Transforms/InstSimplify/ctpop-pow2.ll
Log Message:
-----------
[ValueTracking] Add KnownBits patterns `xor(x, x - 1)` and `and(x, -x)` for knowing upper bits to be zero
These two BMI pattern will clear the upper bits of result past the
first set bit. So if we know a single bit in `x` is set, we know that
`results[bitwidth - 1, log2(x) + 1] = 0`.
Alive2:
blsmsk: https://alive2.llvm.org/ce/z/a397BS
blsi: https://alive2.llvm.org/ce/z/tsbQhC
Differential Revision: https://reviews.llvm.org/D142271
Compare: https://github.com/llvm/llvm-project/compare/4384127549e2...9a8f517f5750
More information about the All-commits
mailing list