1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64 -mcpu=apple-m1 -mattr=+store-pair-suppress -o - %s | FileCheck %s
4 ; Check that stp are not suppressed at minsize.
6 define void @test_default(ptr %dst, <8 x i32> %v0) {
7 ; CHECK-LABEL: test_default:
8 ; CHECK: // %bb.0: // %entry
9 ; CHECK-NEXT: uzp1 v0.8h, v0.8h, v1.8h
10 ; CHECK-NEXT: xtn v0.8b, v0.8h
11 ; CHECK-NEXT: mul v1.8b, v0.8b, v0.8b
12 ; CHECK-NEXT: str d1, [x0, #8]
13 ; CHECK-NEXT: str d0, [x0]
16 %add.ptr.1 = getelementptr i8, ptr %dst, i64 8
17 %t = trunc <8 x i32> %v0 to <8 x i8>
18 %mul = mul <8 x i8> %t, %t
19 store <8 x i8> %mul, ptr %add.ptr.1, align 1
20 store <8 x i8> %t, ptr %dst, align 1
24 define void @test_minsize(ptr %dst, <8 x i32> %v0) minsize {
25 ; CHECK-LABEL: test_minsize:
26 ; CHECK: // %bb.0: // %entry
27 ; CHECK-NEXT: uzp1 v0.8h, v0.8h, v1.8h
28 ; CHECK-NEXT: xtn v0.8b, v0.8h
29 ; CHECK-NEXT: mul v1.8b, v0.8b, v0.8b
30 ; CHECK-NEXT: stp d0, d1, [x0]
33 %add.ptr.1 = getelementptr i8, ptr %dst, i64 8
34 %t = trunc <8 x i32> %v0 to <8 x i8>
35 %mul = mul <8 x i8> %t, %t
36 store <8 x i8> %mul, ptr %add.ptr.1, align 1
37 store <8 x i8> %t, ptr %dst, align 1
41 define void @test_optsize(ptr %dst, <8 x i32> %v0) optsize {
42 ; CHECK-LABEL: test_optsize:
43 ; CHECK: // %bb.0: // %entry
44 ; CHECK-NEXT: uzp1 v0.8h, v0.8h, v1.8h
45 ; CHECK-NEXT: xtn v0.8b, v0.8h
46 ; CHECK-NEXT: mul v1.8b, v0.8b, v0.8b
47 ; CHECK-NEXT: stp d0, d1, [x0]
50 %add.ptr.1 = getelementptr i8, ptr %dst, i64 8
51 %t = trunc <8 x i32> %v0 to <8 x i8>
52 %mul = mul <8 x i8> %t, %t
53 store <8 x i8> %mul, ptr %add.ptr.1, align 1
54 store <8 x i8> %t, ptr %dst, align 1