1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mattr=+sve -force-streaming-compatible < %s | FileCheck %s
3 ; RUN: llc -mattr=+sme -force-streaming < %s | FileCheck %s
4 ; RUN: llc -force-streaming-compatible < %s | FileCheck %s --check-prefix=NONEON-NOSVE
7 target triple = "aarch64-unknown-linux-gnu"
9 ; A NEON Q-register mov is not valid in streaming mode, but an SVE Z-register mov is.
10 define fp128 @test_streaming_compatible_register_mov(fp128 %q0, fp128 %q1) {
11 ; CHECK-LABEL: test_streaming_compatible_register_mov:
13 ; CHECK-NEXT: mov z0.d, z1.d
16 ; NONEON-NOSVE-LABEL: test_streaming_compatible_register_mov:
17 ; NONEON-NOSVE: // %bb.0:
18 ; NONEON-NOSVE-NEXT: str q1, [sp, #-16]!
19 ; NONEON-NOSVE-NEXT: ldr q0, [sp], #16
20 ; NONEON-NOSVE-NEXT: ret
24 ; Test that `movi` isn't used (invalid in streaming mode), but fmov or SVE mov instead.
25 define double @fp_zero_constant() {
26 ; CHECK-LABEL: fp_zero_constant:
28 ; CHECK-NEXT: fmov d0, xzr
31 ; NONEON-NOSVE-LABEL: fp_zero_constant:
32 ; NONEON-NOSVE: // %bb.0:
33 ; NONEON-NOSVE-NEXT: fmov d0, xzr
34 ; NONEON-NOSVE-NEXT: ret
38 define <2 x i64> @fixed_vec_zero_constant() {
39 ; CHECK-LABEL: fixed_vec_zero_constant:
41 ; CHECK-NEXT: mov z0.d, #0 // =0x0
42 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
45 ; NONEON-NOSVE-LABEL: fixed_vec_zero_constant:
46 ; NONEON-NOSVE: // %bb.0:
47 ; NONEON-NOSVE-NEXT: adrp x8, .LCPI2_0
48 ; NONEON-NOSVE-NEXT: ldr q0, [x8, :lo12:.LCPI2_0]
49 ; NONEON-NOSVE-NEXT: ret
50 ret <2 x i64> zeroinitializer
53 define <2 x double> @fixed_vec_fp_zero_constant() {
54 ; CHECK-LABEL: fixed_vec_fp_zero_constant:
56 ; CHECK-NEXT: mov z0.d, #0 // =0x0
57 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
60 ; NONEON-NOSVE-LABEL: fixed_vec_fp_zero_constant:
61 ; NONEON-NOSVE: // %bb.0:
62 ; NONEON-NOSVE-NEXT: adrp x8, .LCPI3_0
63 ; NONEON-NOSVE-NEXT: ldr q0, [x8, :lo12:.LCPI3_0]
64 ; NONEON-NOSVE-NEXT: ret
65 ret <2 x double> <double 0.0, double 0.0>