File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -639,15 +639,15 @@ SymmetricResultAnalysis::State SymmetricResultAnalysis::localGuaranteed(
639639 PatternRewriter &rewriter) {
640640 assert (op);
641641
642- auto outTy = cast<RankedTensorType>(op->getResult (0 ).getType ());
643- if (outTy.getRank () != 2 )
644642 if (auto boolAttr = op->getAttrOfType <BoolAttr>(getAttrName ())) {
645643 if (boolAttr.getValue ())
646644 return State::GUARANTEED;
647645 else
648646 return State::NOTGUARANTEED;
649647 }
650648
649+ auto outTy = dyn_cast<RankedTensorType>(op->getResult (0 ).getType ());
650+ if (!outTy || outTy.getRank () != 2 )
651651 return State::NOTGUARANTEED; // this pass only checks for symmetric matrices
652652 if (outTy.getDimSize (0 ) != outTy.getDimSize (1 ))
653653 return State::NOTGUARANTEED; // quick check and exit
You can’t perform that action at this time.
0 commit comments