[llvm] [InstCombine] Missed optimization: Fold (sext(a) & sext(c1)) == c2 to (a & c1) == c2 (PR #112646)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 17 07:47:02 PDT 2024
goldsteinn wrote:
Welcome and thank you for the contribution!
To expand on how to make it generic, see: https://alive2.llvm.org/ce/z/RWYisS
So for your checks on what are valid for C1/C2, you can use `{C1,C2}->getNumSignBits() <= A->getType()->getScalarSizeInBits()`
https://github.com/llvm/llvm-project/pull/112646
More information about the llvm-commits
mailing list