[llvm] [InstCombine] Prevent constant operand shrinkage on returns of zero-extension ANDs (PR #146201)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 30 00:10:51 PDT 2025


dtcxzyw wrote:

`TLI->targetShrinkDemandedConstant` is responsible for the same logic to preserve zext patterns. I'd like to add a new TLI hook `targetShrinkDemandedConstant(BitwiseOp, RHSC, DemandedBits)`, then implement this transform in a new CodeGen Pass (before CodeGenPrepare).


https://github.com/llvm/llvm-project/pull/146201


More information about the llvm-commits mailing list