[PATCH] D150378: [Instsimplfy] X == Y ? 0 : X - Y --> X - Y

Jun Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 22:21:32 PDT 2023


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


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:4252
+      if (Opcode == Instruction::Sub && NewOps[0] == NewOps[1])
+        return ::simplifyInstructionWithOperands(I, NewOps, Q, MaxRecurse - 1);
+
----------------
goldstein.w.n wrote:
> I think this can just return zero.
Done, thx.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150378



More information about the llvm-commits mailing list