[llvm] [InstCombine] lshr (mul (X, 2^N + 1)), N -> X when X is half-width (PR #93677)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 15:34:22 PDT 2024
================
@@ -1465,9 +1465,9 @@ Instruction *InstCombinerImpl::visitLShr(BinaryOperator &I) {
MulC->logBase2() == ShAmtC) {
// Look for a "splat" mul pattern - it replicates bits across each half
// of a value, so a right shift is just a mask of the low bits:
----------------
topperc wrote:
Comment needs to be updated. "mask of the low bits" describes the AND that was inserted before.
https://github.com/llvm/llvm-project/pull/93677
More information about the llvm-commits
mailing list