llvm-project
9f70ca88 - [VectorCombine] Combine adjacent loads feeding as shuffle operands (#213007)

Commit
11 days ago
[VectorCombine] Combine adjacent loads feeding as shuffle operands (#213007) Fold `shuffle(loadA, loadB, old_mask) --> shuffle(loadAB, poison, new_mask)` if loadA and loadB are proven adjacent. The motivating case is https://godbolt.org/z/xjYfd6YhY where you have 2 contiguous loads feeding as operands to **multiple** shuffles. These shuffles generate EXT and SPLICE instructions. SPLICE has very less throughput and high latency making the code sequence inefficient. Instead, we can generate TBL instruction. Here is short repro and improved version Short repro: https://godbolt.org/z/nM64oa7zb Improved version: https://godbolt.org/z/cob9178nK
Author
Parents
Loading