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

[VPlan] Recipe for splat operation #117139

Open
Mel-Chen opened this issue Nov 21, 2024 · 0 comments
Open

[VPlan] Recipe for splat operation #117139

Mel-Chen opened this issue Nov 21, 2024 · 0 comments

Comments

@Mel-Chen
Copy link
Contributor

While trying to re-implement min/max with index, I discovered this potential bug.

middle.block:
  EMIT vp<%8> = compute-reduction-result ir<%max.09>, ir<%1>
  EMIT vp<%9> = icmp eq ir<%1>, vp<%8>

Currently, it seems there’s no check to ensure the vector preheader dominates the definition before hoisting the splat to the vector preheader. This could result in a use-before-definition issue.

For now, I’ve temporarily reverted SafeToHoist to an earlier setting, but I think the best approach would likely be to introduce a dedicated VPInstruction::Splat.

@Mel-Chen Mel-Chen changed the title [VPlan] Recipe fo splat operation [VPlan] Recipe for splat operation Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants