Skip to content

Commit 9c2e0bd

Browse files
authored
[PowerPC][NFC] Pre-commit test case for checking whether mtvsrbmi power10 instruction not used (#143956)
Verify whether the generated assembly for the following function includes the mtvsrbmi instruction. vector unsigned char v00FF() { vector unsigned char x = { 0xFF, 0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 }; return x; }
1 parent 6ca31ad commit 9c2e0bd

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

llvm/test/CodeGen/PowerPC/mtvsrbmi.ll

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
9+
; RUN: llc < %s -ppc-asm-full-reg-names -mtriple=powerpc-ibm-aix -mcpu=pwr10 -verify-machineinstrs \
10+
; RUN: | FileCheck %s --check-prefix=CHECK
11+
12+
define dso_local noundef range(i8 -1, 1) <16 x i8> @_Z5v00FFv() {
13+
; CHECK-LABEL: _Z5v00FFv:
14+
; CHECK: # %bb.0: # %entry
15+
; CHECK-NEXT: lwz r3, L..C0(r2) # %const.0
16+
; CHECK-NEXT: lxv vs34, 0(r3)
17+
; CHECK-NEXT: blr
18+
entry:
19+
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>
20+
}
21+
22+
; CHECK: L..CPI0_0:
23+
; CHECK-NEXT: .byte 255 # 0xff
24+
; CHECK-NEXT: .byte 0 # 0x0
25+
; CHECK-NEXT: .byte 0 # 0x0
26+
; CHECK-NEXT: .byte 0 # 0x0
27+
; CHECK-NEXT: .byte 0 # 0x0
28+
; CHECK-NEXT: .byte 0 # 0x0
29+
; CHECK-NEXT: .byte 0 # 0x0
30+
; CHECK-NEXT: .byte 0 # 0x0
31+
; CHECK-NEXT: .byte 0 # 0x0
32+
; CHECK-NEXT: .byte 0 # 0x0
33+
; CHECK-NEXT: .byte 0 # 0x0
34+
; CHECK-NEXT: .byte 0 # 0x0
35+
; CHECK-NEXT: .byte 0 # 0x0
36+
; CHECK-NEXT: .byte 0 # 0x0
37+
; CHECK-NEXT: .byte 0 # 0x0
38+
; CHECK-NEXT: .byte 0 # 0x0
39+
40+
; CHECK: ._Z5v00FFv:
41+
; CHECK-NEXT: # %bb.0:
42+
; CHECK-NEXT: lwz r3, L..C0(r2)
43+
; CHECK-NEXT: lxv vs34, 0(r3)
44+
; CHECK-NEXT: blr

0 commit comments

Comments
 (0)