[PATCH] D154953: [InstSimplify] Remove the remainder loop if we know the mask is always true

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 18:28:15 PDT 2023


Allen marked an inline comment as done.
Allen added inline comments.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:2138
+  if (match(Op1, m_Power2(PowerC)) &&
+      match(Op0, m_Xor(m_Value(Shift), m_AllOnes())) &&
+      match(Shift, m_Shl(m_AllOnes(), m_Value(X)))) {
----------------
goldstein.w.n wrote:
> `m_Not` instead of `m_Xor(v, -1)`.
> 
> Also the comment doesn't quite match the codes.
Apply your comment, thanks. (Also adjust the comment)


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

https://reviews.llvm.org/D154953



More information about the llvm-commits mailing list