[llvm] 99ec548 - [AArch64] Test for Store Pair Suppress under minsize.

David Green via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 4 07:01:22 PDT 2021


Author: David Green
Date: 2021-10-04T15:01:18+01:00
New Revision: 99ec54853047410dddef4f6a3afbc1fed881a7cd

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

LOG: [AArch64] Test for Store Pair Suppress under minsize.

Added: 
    llvm/test/CodeGen/AArch64/storepairsuppress_minsize.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/AArch64/storepairsuppress_minsize.ll b/llvm/test/CodeGen/AArch64/storepairsuppress_minsize.ll
new file mode 100644
index 0000000000000..fd6c1ce5e3f8e
--- /dev/null
+++ b/llvm/test/CodeGen/AArch64/storepairsuppress_minsize.ll
@@ -0,0 +1,74 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=aarch64-none-eabi -mcpu=cortex-a55 -o - %s | FileCheck %s
+
+; Check that stp are not suppressed at minsize.
+
+%T_IN_BLOCK = type [ 2 x { double, { double, double } } ]
+declare %T_IN_BLOCK @return_in_block()
+ at in_block_store = dso_local global %T_IN_BLOCK zeroinitializer, align 8
+
+define void @test_default() {
+; CHECK-LABEL: test_default:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl return_in_block
+; CHECK-NEXT:    adrp x8, in_block_store
+; CHECK-NEXT:    add x8, x8, :lo12:in_block_store
+; CHECK-NEXT:    str d0, [x8]
+; CHECK-NEXT:    str d1, [x8, #8]
+; CHECK-NEXT:    str d2, [x8, #16]
+; CHECK-NEXT:    str d3, [x8, #24]
+; CHECK-NEXT:    str d4, [x8, #32]
+; CHECK-NEXT:    str d5, [x8, #40]
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:    ret
+  %1 = call %T_IN_BLOCK @return_in_block()
+  store %T_IN_BLOCK %1, %T_IN_BLOCK* @in_block_store
+  ret void
+}
+
+define void @test_minsize() minsize {
+; CHECK-LABEL: test_minsize:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl return_in_block
+; CHECK-NEXT:    adrp x8, in_block_store
+; CHECK-NEXT:    add x8, x8, :lo12:in_block_store
+; CHECK-NEXT:    str d0, [x8]
+; CHECK-NEXT:    str d1, [x8, #8]
+; CHECK-NEXT:    str d2, [x8, #16]
+; CHECK-NEXT:    str d3, [x8, #24]
+; CHECK-NEXT:    str d4, [x8, #32]
+; CHECK-NEXT:    str d5, [x8, #40]
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:    ret
+  %1 = call %T_IN_BLOCK @return_in_block()
+  store %T_IN_BLOCK %1, %T_IN_BLOCK* @in_block_store
+  ret void
+}
+
+define void @test_optsize() optsize {
+; CHECK-LABEL: test_optsize:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 16
+; CHECK-NEXT:    .cfi_offset w30, -16
+; CHECK-NEXT:    bl return_in_block
+; CHECK-NEXT:    adrp x8, in_block_store
+; CHECK-NEXT:    add x8, x8, :lo12:in_block_store
+; CHECK-NEXT:    str d0, [x8]
+; CHECK-NEXT:    str d1, [x8, #8]
+; CHECK-NEXT:    str d2, [x8, #16]
+; CHECK-NEXT:    str d3, [x8, #24]
+; CHECK-NEXT:    str d4, [x8, #32]
+; CHECK-NEXT:    str d5, [x8, #40]
+; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
+; CHECK-NEXT:    ret
+  %1 = call %T_IN_BLOCK @return_in_block()
+  store %T_IN_BLOCK %1, %T_IN_BLOCK* @in_block_store
+  ret void
+}


        


More information about the llvm-commits mailing list