[llvm] [AMDGPU] Identify vector idiom to unlock SROA (PR #161200)

Yaxun Liu via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 30 06:12:57 PDT 2025


yxsamliu wrote:

> My high level question here is why does this need to be a separate pass rather than integrated in SROA? SROA already has select speculation support. It's currently limited to speculating load/store of select only, but that seems like something that could be generalized? At least the case with CFG modification. (Without CFG modification we need to pick a replacement load/store type.)

Yes that part does not involve picking a vector type and is target-neutral. I can try moving that part to SROA.

The remaining part is mainly about:

1. pick a vector type and use load/store to replace memcpy (highly target specific)

2. speculative load of both true/false values (also highly target specific)

my concern is that they may not be suitable as generic passes.

https://github.com/llvm/llvm-project/pull/161200


More information about the llvm-commits mailing list