[llvm] c260024 - [AArch64] NFC: Fix broken test sve-fixed-ld2-alloca.ll

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 09:24:06 PST 2022


Author: Sander de Smalen
Date: 2022-11-16T17:23:20Z
New Revision: c2600244fc142c82c6d4cebf87d2143618b914f7

URL: https://github.com/llvm/llvm-project/commit/c2600244fc142c82c6d4cebf87d2143618b914f7
DIFF: https://github.com/llvm/llvm-project/commit/c2600244fc142c82c6d4cebf87d2143618b914f7.diff

LOG: [AArch64] NFC: Fix broken test sve-fixed-ld2-alloca.ll

There were several issues with this test, the most obvious being
that %strided.vec wasn't used and therefore could be deadcoded.

I've verified that the updated test still covers the code-changes
from its original patch.

Added: 
    

Modified: 
    llvm/test/CodeGen/AArch64/sve-fixed-ld2-alloca.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/AArch64/sve-fixed-ld2-alloca.ll b/llvm/test/CodeGen/AArch64/sve-fixed-ld2-alloca.ll
index 0ec5c60324a0..0fc1f2ddc33b 100644
--- a/llvm/test/CodeGen/AArch64/sve-fixed-ld2-alloca.ll
+++ b/llvm/test/CodeGen/AArch64/sve-fixed-ld2-alloca.ll
@@ -3,23 +3,27 @@
 
 target triple = "aarch64-unknown-linux-gnu"
 
+declare void @def(ptr)
+
 define void @st1d_fixed(ptr %ptr) #0 {
 ; CHECK-LABEL: st1d_fixed:
 ; CHECK:       // %bb.0:
-; CHECK-NEXT:    sub sp, sp, #16
-; CHECK-NEXT:    add x8, sp, #8
+; CHECK-NEXT:    sub sp, sp, #144
+; CHECK-NEXT:    stp x30, x19, [sp, #128] // 16-byte Folded Spill
+; CHECK-NEXT:    mov x19, x0
+; CHECK-NEXT:    mov x0, sp
+; CHECK-NEXT:    bl def
 ; CHECK-NEXT:    ptrue p0.d
-; CHECK-NEXT:    ld2d { z0.d, z1.d }, p0/z, [x8]
-; CHECK-NEXT:    mov x8, #4
-; CHECK-NEXT:    mov z0.d, #0 // =0x0
-; CHECK-NEXT:    st1d { z0.d }, p0, [x0]
-; CHECK-NEXT:    st1d { z0.d }, p0, [x0, x8, lsl #3]
-; CHECK-NEXT:    add sp, sp, #16
+; CHECK-NEXT:    ld2d { z0.d, z1.d }, p0/z, [sp]
+; CHECK-NEXT:    st1d { z0.d }, p0, [x19]
+; CHECK-NEXT:    ldp x30, x19, [sp, #128] // 16-byte Folded Reload
+; CHECK-NEXT:    add sp, sp, #144
 ; CHECK-NEXT:    ret
-  %alloc = alloca [16 x double], i32 0
+  %alloc = alloca [16 x double]
+  call void @def(ptr %alloc)
   %load = load <8 x double>, ptr %alloc
   %strided.vec = shufflevector <8 x double> %load, <8 x double> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
-  store <8 x double> zeroinitializer, ptr %ptr
+  store <4 x double> %strided.vec, ptr %ptr
   ret void
 }
 


        


More information about the llvm-commits mailing list