[PATCH] D153502: [DAGCombiner] Change foldAndOrOfSETCC() to optimize and/or patterns
Konstantina Mitropoulou via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 6 15:30:51 PDT 2023
kmitropoulou added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:6036
+ // predicate and have a common operand.
+ auto AreSameCMPsAndHaveCommonOperand = [&]() {
+ if (LHS->getOpcode() != ISD::SETCC || RHS->getOpcode() != ISD::SETCC)
----------------
arsenm wrote:
> Is this just using LHS/RHS? Use explicit arguments and drop the default capture all?
No, it also uses the operands of LHS/RHS (LHS0, LHS1, RHS0, RHS1) and their condition code (CCL, CCR). If I drop '&', then I should pass 8 arguments or I should pass LHS and RHS and recalculate the other 6 values. So, I did not do it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153502/new/
https://reviews.llvm.org/D153502
More information about the llvm-commits
mailing list