[PATCH] D135380: [GlobalISel] Combine (X op Y) == X --> Y == 0

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 21:11:34 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:6079
+      m_c_GICmp(m_Pred(Pred), m_Reg(X), m_GSub(m_Reg(OpLHS), m_Reg(Y))));
+  if (MatchedSub && X != OpLHS)
+    return false;
----------------
I'm not seeing why sub needs to be handled as a separate case 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135380/new/

https://reviews.llvm.org/D135380



More information about the llvm-commits mailing list