Fixing vector add pattern that incorrectly returns success.

The pattern is returning success even if it does no work leading to pattern application running up to the max iteration count and failing.

Reviewed By: nicolasvasilache, mravishankar

Differential Revision: https://reviews.llvm.org/D109791
This commit is contained in:
MaheshRavishankar 2021-09-16 14:48:09 -07:00
parent 233b42a8bb
commit 04a66f8d2b
1 changed files with 1 additions and 1 deletions

View File

@ -793,7 +793,7 @@ struct CanonicalizeContractAdd : public OpRewritePattern<AddOpType> {
Value a = addOp->getOperand(0), b = addOp->getOperand(1);
vector::ContractionOp contract = canonicalize(a, b);
contract = contract ? contract : canonicalize(b, a);
return success();
return contract ? success() : failure();
}
};