[llvm] [GlobalISel][AArch64] Do not remove dst type predicates from pattern children nodes. (PR #221576)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 03:58:34 PDT 2026


================
@@ -1628,8 +1628,15 @@ void InstructionMatcher::optimize() {
 
   if (InsnVarID > 0) {
     assert(!Operands.empty() && "Nested instruction is expected to def a vreg");
-    for (auto &OP : Operands[0]->predicates())
+    for (auto &OP : Operands[0]->predicates()) {
+      // LLTOperandMatcher need to be kept as they may have a more specific type
+      // than the parent instruction type.
+      if (const auto *LLTPred = dyn_cast<LLTOperandMatcher>(&*OP))
----------------
arsenm wrote:

Braces 

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


More information about the llvm-commits mailing list