[PATCH] D147040: [AArch64][CodeGen] Use interleave store for streaming compatible functions
Caroline via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 29 06:03:16 PDT 2023
CarolineConcatto added inline comments.
================
Comment at: llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-shuffle.ll:21
+define void @interleave_store_without_splat(ptr %a, <8 x i32> %v1, <8 x i32> %v2) #0 {
+; CHECK-LABEL: interleave_store_without_splat:
----------------
david-arm wrote:
> I don't think you need the second `%v2` argument here, since it's never actually used. You can rewrite the IR below to just be:
>
> %interleaved = shufflevector <8 x i32> %v1, <8 x i32> undef, <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7>
> store <8 x i32> %interleaved, ptr %a, align 1
Yes, you are right. I should have changed the size of the input vectors. I think now it is better. Right?
================
Comment at: llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-shuffle.ll:35
+
+define void @interleave_store_legalization(ptr %a, <8 x i32> %b) #0 {
+; CHECK-LABEL: interleave_store_legalization:
----------------
david-arm wrote:
> This test has the same problem as `@hang_when_merging_stores_after_legalisation`, because it's using splats. I think you can do this:
>
> ```define void @interleave_store_legalization(ptr %p, <8 x i32> %a, <8 x i32> %b) #0 {
> %interleaved = shufflevector <8 x i32> %a, <8 x i32> %b, <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
> store <16 x i32> %interleaved, ptr %p, align 1
> ret void
> }```
I don't fully understand why the splat in not a good example, but I did changed. Hope it is better now,
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147040/new/
https://reviews.llvm.org/D147040
More information about the llvm-commits
mailing list