[PATCH] D127115: [RFC][DAGCombine] Make sure combined nodes are added back to the worklist in topological order.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 09:23:31 PDT 2023
RKSimon added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2433-2439
+ // Peek through any trunc/zext to shift amount type.
+ if ((BinOpcode == ISD::SHL || BinOpcode == ISD::SRA ||
+ BinOpcode == ISD::SRL) &&
+ (Sel.getOpcode() == ISD::TRUNCATE ||
+ Sel.getOpcode() == ISD::ZERO_EXTEND) &&
+ Sel.hasOneUse())
+ Sel = Sel.getOperand(0);
----------------
deadalnix wrote:
> Shouldn't this come in its own patch?
Yes, I just hadn't found a good way to test with trunk so far.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127115/new/
https://reviews.llvm.org/D127115
More information about the llvm-commits
mailing list