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

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 30 11:56:54 PDT 2020


xbolva00 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))))
----------------
Maybe m_SpecificAllowFreeze or so is more readable than passing true?


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