[llvm] [GlobalISel] Fold instructions with fully-known bits to a constant. (PR #224254)

Vikash Gupta via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 00:30:09 PDT 2026


================
@@ -3363,6 +3363,35 @@ bool CombinerHelper::matchRedundantAnd(MachineInstr &MI,
   return false;
 }
 
+bool CombinerHelper::matchKnownBitsToConstant(MachineInstr &MI,
+                                              APInt &MatchInfo) const {
+  if (!VT)
----------------
vg0204 wrote:

Right, but isn't need to be taken care at more root level, to cover all such match rules that need VT, which is not scope of this patch!

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


More information about the llvm-commits mailing list