[llvm] [SelectionDAG] Improve isOrEquivalentToAdd (PR #82767)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 23 09:38:43 PST 2024
================
@@ -4214,7 +4214,7 @@ bool SelectionDAGISel::isOrEquivalentToAdd(const SDNode *N) const {
// the alignment, then this or is really an add.
return (Off >= 0) && (((A.value() - 1) & Off) == unsigned(Off));
}
- return false;
+ return CurDAG->haveNoCommonBitsSet(N->getOperand(0), N->getOperand(1));
----------------
topperc wrote:
I think we should migrate to isBaseWithConstantOffset and consider removing isOrEquivalentToAdd.
https://github.com/llvm/llvm-project/pull/82767
More information about the llvm-commits
mailing list