[PATCH] D150378: [Instsimplfy] X == Y ? 0 : X - Y --> X - Y
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 11 22:16:40 PDT 2023
goldstein.w.n 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);
+
----------------
I think this can just return zero.
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