Issue |
117139
|
Summary |
[VPlan] Recipe fo splat operation
|
Labels |
vectorizers,
vectorization
|
Assignees |
|
Reporter |
Mel-Chen
|
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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs