Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / test / CodeGen / AArch64 / sve-streaming-mode-test-register-mov.ll
blob9c7a3d5046d0e8f9110aa2dc5e962164613fe8d1
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:
12 ; CHECK:       // %bb.0:
13 ; CHECK-NEXT:    mov z0.d, z1.d
14 ; CHECK-NEXT:    ret
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
21   ret fp128 %q1
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:
27 ; CHECK:       // %bb.0:
28 ; CHECK-NEXT:    fmov d0, xzr
29 ; CHECK-NEXT:    ret
31 ; NONEON-NOSVE-LABEL: fp_zero_constant:
32 ; NONEON-NOSVE:       // %bb.0:
33 ; NONEON-NOSVE-NEXT:    fmov d0, xzr
34 ; NONEON-NOSVE-NEXT:    ret
35   ret double 0.0
38 define <2 x i64> @fixed_vec_zero_constant() {
39 ; CHECK-LABEL: fixed_vec_zero_constant:
40 ; CHECK:       // %bb.0:
41 ; CHECK-NEXT:    mov z0.d, #0 // =0x0
42 ; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z0
43 ; CHECK-NEXT:    ret
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:
55 ; CHECK:       // %bb.0:
56 ; CHECK-NEXT:    mov z0.d, #0 // =0x0
57 ; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z0
58 ; CHECK-NEXT:    ret
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>