Skip to content

Commit ffa3807

Browse files
committed
[ValueTracking] Handle FADD and XOR in matchSimpleRecurrence.
Note: I'm not sure how this can be tested, but llvm#143878 is affected by this change.
1 parent 8b167db commit ffa3807

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Analysis/ValueTracking.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9072,7 +9072,7 @@ bool llvm::matchSimpleRecurrence(const PHINode *P, BinaryOperator *&BO,
90729072
switch (Opcode) {
90739073
default:
90749074
continue;
9075-
// TODO: Expand list -- xor, gep, uadd.sat etc.
9075+
// TODO: Expand list -- gep, uadd.sat etc.
90769076
case Instruction::LShr:
90779077
case Instruction::AShr:
90789078
case Instruction::Shl:
@@ -9082,7 +9082,9 @@ bool llvm::matchSimpleRecurrence(const PHINode *P, BinaryOperator *&BO,
90829082
case Instruction::URem:
90839083
case Instruction::And:
90849084
case Instruction::Or:
9085+
case Instruction::Xor:
90859086
case Instruction::Mul:
9087+
case Instruction::FAdd:
90869088
case Instruction::FMul: {
90879089
Value *LL = LU->getOperand(0);
90889090
Value *LR = LU->getOperand(1);

0 commit comments

Comments
 (0)