[PATCH] D77453: [GlobalISel] Simplify G_ADD when it has (0-X) on the LHS or RHS
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 5 06:34:20 PDT 2020
arsenm accepted this revision.
arsenm added a comment.
This revision is now accepted and ready to land.
Herald added a project: LLVM.
LGTM. InstCombine seems to not preserve flags in this case
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1619-1620
+ int64_t Cst;
+ if (!mi_match(MaybeSub, MRI, m_GSub(m_ICst(Cst), m_Reg(NewRHS))) ||
+ Cst != 0)
+ return false;
----------------
We should add an m_Zero() at some point
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77453/new/
https://reviews.llvm.org/D77453
More information about the llvm-commits
mailing list