Skip to content

Commit ab28b45

Browse files
committed
Actually check >= operands
1 parent 8aa5b69 commit ab28b45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Analysis/ValueTracking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9148,7 +9148,7 @@ static bool matchTwoInputRecurrence(const PHINode *PN, InstTy *&Inst,
91489148

91499149
for (unsigned I = 0; I != 2; ++I) {
91509150
if (auto *Operation = dyn_cast<InstTy>(PN->getIncomingValue(I));
9151-
Operation && Operation->getNumOperands() == 2) {
9151+
Operation && Operation->getNumOperands() >= 2) {
91529152
Value *LHS = Operation->getOperand(0);
91539153
Value *RHS = Operation->getOperand(1);
91549154
if (LHS != PN && RHS != PN)

0 commit comments

Comments
 (0)