[PATCH] D125836: [DAG] Fold (srl (shl x, c1), c2) -> and(shl/srl(x, c3), m) (WIP)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 10:48:29 PDT 2022
RKSimon added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9442
+ SDValue Shift = DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), Diff);
+ return DAG.getNode(ISD::AND, SDLoc(N0), VT, Shift, Mask);
+ }
----------------
craig.topper wrote:
> Why is the last SDLoc from N0?
It was copy+pasted from the (shl (srl x, c1), c2) variant
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125836/new/
https://reviews.llvm.org/D125836
More information about the llvm-commits
mailing list