[PATCH] D143371: [DAG][AArch64][ARM] Recognize hadd from wrapping flags.
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 6 05:56:40 PST 2023
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM - see inline for possible logic simplification.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:959-965
if ((ConstOp = isConstOrConstSplat(Op1, DemandedElts)) &&
ConstOp->isOne()) {
ExtOpA = Op2;
ExtOpB = Op3;
+ Add2 = A;
return true;
}
----------------
It's semi-independent of this patch, but do we need this clause? We're looking for a "1" constant, so it would always get canonicalized to operand 1 of an incoming 'add'?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143371/new/
https://reviews.llvm.org/D143371
More information about the llvm-commits
mailing list