[llvm] [ARM] Replace manual CLS expansion with ISD::CTLS (PR #178430)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 2 02:22:08 PST 2026
================
@@ -9575,6 +9563,24 @@ SDValue TargetLowering::expandCTLZ(SDNode *Node, SelectionDAG &DAG) const {
return DAG.getNode(ISD::CTPOP, dl, VT, Op);
}
+SDValue TargetLowering::expandCTLS(SDNode *Node, SelectionDAG &DAG) const {
+ SDLoc dl(Node);
+ EVT VT = Node->getValueType(0);
+ SDValue Op = Node->getOperand(0);
----------------
RKSimon wrote:
We should probably FREEZE Op as we're increasing its uses:
```suggestion
SDValue Op = DAG.getFreeze(Node->getOperand(0));
```
https://github.com/llvm/llvm-project/pull/178430
More information about the llvm-commits
mailing list