Skip to content

Conversation

sBobHuang
Copy link

View details of issue 421 .

@@ -332,7 +332,7 @@ AffineApplyNormalizer::AffineApplyNormalizer(AffineMap map,
isValidSymbolInt(t.getDefiningOp()->getOperand(1))) &&
(!(fix(t.getDefiningOp()->getOperand(0), false) &&
fix(t.getDefiningOp()->getOperand(1), false)))) ||
(t.getDefiningOp<DivSIOp>() &&
((t.getDefiningOp<DivUIOp>() || t.getDefiningOp<DivSIOp>()) &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If doing a divui I wonder if we should also check that the divisor is positive. The AffineExpr constraint assumes signed division iirc, which is why we originally didn't include.

Of course crashing is far worse, so we don't want that to occur.

@sBobHuang
Copy link
Author

Thank you very much for the feedback. I did not consider the sign issue with AffineExpr before. I will try another fix. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants