[PATCH] D144284: [X86] Add transform for `(and/or (icmp eq/ne A,-1),(icmp eq/ne A,-1+C))`->`(and/or (icmp eq/ne (and ~A,-1+C),0))`

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 20 18:19:19 PST 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:5922
       LHS0 == RHS0 && LHS1C && RHS1C && OpVT.isInteger() && LHS.hasOneUse() &&
       RHS.hasOneUse()) {
     const APInt &APLhs = LHS1C->getAPIntValue();
----------------
RKSimon wrote:
> It should (eventually) be possible to support non-uniform constants via ISD::matchBinaryPredicate
Is there a change here that would make that easier todo in the future? Or are you just referencing the misnamed tests?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144284



More information about the llvm-commits mailing list