Debian Codegraph @

llvm/test/CodeGen/PowerPC/mtvsrbmi.ll

raw
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; Verify whether the generated assembly for the following function includes the mtvsrbmi instruction.
3 ; vector unsigned char v00FF()
4 ; {
5 ; vector unsigned char x = { 0xFF, 0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 };
6 ; return x;
7 ; }
8 ; vector unsigned short short00FF()
9 ; {
10 ; vector unsigned short x = { 0xFF, 0,0,0, 0,0,0,0};
11 ; return x;
12 ; }
13 ; vector unsigned int int00FF()
14 ; {
15 ; vector unsigned int x = { 0xFF, 0,0,0};
16 ; return x;
17 ; }
18 ; vector unsigned long long longlong00FF()
19 ; {
20 ; vector unsigned long long x = { 0xFF, 0};
21 ; return x;
22 ; }
23
24 ; RUN: llc < %s -ppc-asm-full-reg-names -mtriple=powerpc-ibm-aix -mcpu=pwr10 -verify-machineinstrs \
25 ; RUN: | FileCheck %s --check-prefixes=CHECK,CHECK-BE
26
27 ; RUN: llc < %s -ppc-asm-full-reg-names -mtriple=powerpc64le-unknown-gnu-linux -mcpu=pwr10 -verify-machineinstrs \
28 ; RUN: | FileCheck %s --check-prefixes=CHECK,CHECK-LE
29
30 ; CHECK-NOT: .byte 255
31 ; CHECK-NOT: .byte 0
32
33 define dso_local noundef range(i8 -1, 1) <16 x i8> @_Z5v00FFv() {
34 ; CHECK-BE-LABEL: _Z5v00FFv:
35 ; CHECK-BE: # %bb.0: # %entry
36 ; CHECK-BE-NEXT: mtvsrbmi v2, 32768
37 ; CHECK-BE-NEXT: blr
38 ;
39 ; CHECK-LE-LABEL: _Z5v00FFv:
40 ; CHECK-LE: # %bb.0: # %entry
41 ; CHECK-LE-NEXT: mtvsrbmi v2, 1
42 ; CHECK-LE-NEXT: blr
43
44 entry:
45 ret <16 x i8> <i8 -1, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>
46 }
47
48 define dso_local noundef range(i16 0, 256) <8 x i16> @_Z9short00FFv() {
49 ; CHECK-BE-LABEL: _Z9short00FFv:
50 ; CHECK-BE: # %bb.0: # %entry
51 ; CHECK-BE-NEXT: mtvsrbmi v2, 16384
52 ; CHECK-BE-NEXT: blr
53 ;
54 ; CHECK-LE-LABEL: _Z9short00FFv:
55 ; CHECK-LE: # %bb.0: # %entry
56 ; CHECK-LE-NEXT: mtvsrbmi v2, 1
57 ; CHECK-LE-NEXT: blr
58 entry:
59 ret <8 x i16> <i16 255, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0>
60 }
61
62 define dso_local noundef range(i32 0, 256) <4 x i32> @_Z7int00FFv() {
63 ; CHECK-BE-LABEL: _Z7int00FFv:
64 ; CHECK-BE: # %bb.0: # %entry
65 ; CHECK-BE-NEXT: mtvsrbmi v2, 4096
66 ; CHECK-BE-NEXT: blr
67 ;
68 ; CHECK-LE-LABEL: _Z7int00FFv:
69 ; CHECK-LE: # %bb.0: # %entry
70 ; CHECK-LE-NEXT: mtvsrbmi v2, 1
71 ; CHECK-LE-NEXT: blr
72 entry:
73 ret <4 x i32> <i32 255, i32 0, i32 0, i32 0>
74 }
75
76 define dso_local noundef range(i64 0, 256) <2 x i64> @_Z12longlong00FFv() {
77 ; CHECK-BE-LABEL: _Z12longlong00FFv:
78 ; CHECK-BE: # %bb.0: # %entry
79 ; CHECK-BE-NEXT: mtvsrbmi v2, 256
80 ; CHECK-BE-NEXT: blr
81 ;
82 ; CHECK-LE-LABEL: _Z12longlong00FFv:
83 ; CHECK-LE: # %bb.0: # %entry
84 ; CHECK-LE-NEXT: mtvsrbmi v2, 1
85 ; CHECK-LE-NEXT: blr
86 entry:
87 ret <2 x i64> <i64 255, i64 0>
88 }