llvm-project
0b2fe07e - [VectorCombine] Prevent redundant cost computation for repeated operand pairs in foldShuffleOfIntrinsics (#171965)

Commit
71 days ago
[VectorCombine] Prevent redundant cost computation for repeated operand pairs in foldShuffleOfIntrinsics (#171965) This pr resolves [#170867](https://github.com/llvm/llvm-project/issues/170867) Existing code recomputes the cost for creating a shuffle instruction even for the repeating Intrinsic operand pairs. This will result in higher newCost. Hence the runtime will decide not to fold. The change proposed in this pr will address this issue. When calculating the newCost we are skipping the cost calculation of an operand pair if it was already considered. And when creating the transformed code, we are reusing the already created shuffle instruction for repeated operand pair.
Author
Parents
Loading