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

Thorsten via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 6 13:09:43 PDT 2022


tschuett added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:6062
+  Register LHS, RHS;
+  mi_match(Dst, MRI, m_GICmp(m_Pred(Pred), m_Reg(LHS), m_Reg(RHS)));
+  if (!ICmpInst::isEquality(Pred))
----------------
arsenm wrote:
> Can you really get away without checking the mi_match result?
There is no `[[nodiscard]]` on `mi_match`?


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

https://reviews.llvm.org/D135380



More information about the llvm-commits mailing list