[llvm] [InstCombine] Infer exact for lshr by cttz (PR #136696)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 28 06:14:01 PDT 2025
=?utf-8?b?6buD5ZyL5bqt?= <we3223 at gmail.com>,
=?utf-8?b?6buD5ZyL5bqt?= <we3223 at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/136696 at github.com>
================
@@ -994,6 +994,12 @@ static bool setShiftFlags(BinaryOperator &I, const SimplifyQuery &Q) {
I.setIsExact();
return true;
}
+ // Infer 'exact' flag if shift amount is cttz(x, 1) on the same operand.
----------------
nikic wrote:
```suggestion
// Infer 'exact' flag if shift amount is cttz(x) on the same operand.
```
https://github.com/llvm/llvm-project/pull/136696
More information about the llvm-commits
mailing list