[PATCH] D140465: [RISCV] Add DAG combine to fold (select C, (add X, Y), Y) -> (add (select C, X, 0), Y).

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 21 01:50:36 PST 2022


asb accepted this revision.
asb added a comment.
This revision is now accepted and ready to land.

Modulo minor feedback on a code comment (same applies for the patch title), this LGTM.



================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:9627
 
+// Try to fold (select C, (add X, Y), Y) -> (add (select C, X, 0), Y).
+static SDValue tryFoldSelectIntoOp(SDNode *N, SelectionDAG &DAG,
----------------
This comment doesn't match the body of the function, as it handles sub/add/or/xor


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140465



More information about the llvm-commits mailing list