[llvm] [InstCombine] Allow load to store forwarding for scalable structs (PR #123908)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 01:57:20 PST 2025


https://github.com/nikic commented:

> Non-scalable structs are decomposed through unpackStoreToAggregate before they get here. Geps with scalable offsets are not valid so they would require i8 gep types with vscale offsets that do not easily get cleaned up into bitcasts.

Could you provide some more detail on what the problem with this approach is? I'd expect this to work (not for InstCombine alone, but in conjunction with GVN for example).

Generally we really shouldn't have aggregate load/stores in IR, it's a shame clang is emitting something like this.

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


More information about the llvm-commits mailing list