Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AffineApplyNormalizer assert Error #422

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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