[llvm] [Instcombine] Fold a zero-select hexadecimal digit count into ctlz(x | 1) (PR #215073)
Jeong Jihyeon via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 9 07:50:06 PDT 2026
================
@@ -1528,6 +1528,103 @@ static Instruction *foldSelectCtlzToCttz(ICmpInst *ICI, Value *TrueVal,
return CallInst::Create(F, {X, Builder.getFalse()});
}
+static Value *foldSelectCtlzWithNonZeroInput(ICmpInst *ICI, Value *TrueVal,
----------------
JihyeonJeong129 wrote:
Thanks for the suggestion. That makes sense. I'll rework this using `simplifyWithOpReplaced()` and update the tests accordingly.
https://github.com/llvm/llvm-project/pull/215073
More information about the llvm-commits
mailing list