[PATCH] D77076: [InstSimplify] Allow some arithmetic optimizations for add/sub/div/rem look through freeze

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 01:36:23 PDT 2020


aqjune marked 2 inline comments as done.
aqjune added inline comments.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:646
   Value *Y = nullptr;
-  if (match(Op1, m_Sub(m_Value(Y), m_Specific(Op0))) ||
-      match(Op0, m_Sub(m_Value(Y), m_Specific(Op1))))
+  if (match(Op1, m_Sub(m_Value(Y), m_Specific(Op0, true))) ||
+      match(Op0, m_Sub(m_Value(Y), m_Specific(Op1, true))))
----------------
xbolva00 wrote:
> Maybe m_SpecificAllowFreeze or so is more readable than passing true?
Removed the true argument


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77076





More information about the llvm-commits mailing list