[PATCH] D125836: [DAG] Fold (srl (shl x, c1), c2) -> and(shl/srl(x, c3), m) (WIP)
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 10:58:35 PDT 2022
craig.topper 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);
+ }
----------------
RKSimon wrote:
> craig.topper wrote:
> > Why is the last SDLoc from N0?
> It was copy+pasted from the (shl (srl x, c1), c2) variant
Is that correct? Can you swap the order of debug locs? The N0 debug loc is now after the N location in the DAG
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