Skip to content

Conversation

@arpitj1
Copy link
Contributor

@arpitj1 arpitj1 commented Mar 28, 2025

affine.if result if yields a constant with one user that does index cast on it. Then the index cast is moved inside the affine.if

Value value = result.value();

// Skip if the result is not an integer type that can be index-cast
if (!value.getType().isIntOrIndex()) {
Copy link
Member

Choose a reason for hiding this comment

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

can we add a further restriction here if the yielded results are both constants?

Copy link
Member

Choose a reason for hiding this comment

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

or I suppose if at least one of the yielded results are constants*

Copy link
Member

Choose a reason for hiding this comment

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

[that way it is in some sense work reducing]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added this check

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