[PATCH] D133399: [DAGCombiner] Fold (mul (sra X, BW-1), Y) -> (neg (and (sra X, BW-1), Y))
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 7 00:20:28 PDT 2022
RKSimon added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3953
+ SelectionDAG &DAG) {
+ if (N0.getOpcode() != ISD::SRA)
+ return SDValue();
----------------
Would this work more generally if we tested for NumSignBits == BitWidth instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133399/new/
https://reviews.llvm.org/D133399
More information about the llvm-commits
mailing list