[llvm] 9c2e0bd - [PowerPC][NFC] Pre-commit test case for checking whether `mtvsrbmi` power10 instruction not used (#143956)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 13 06:19:15 PDT 2025
Author: zhijian lin
Date: 2025-06-13T09:19:10-04:00
New Revision: 9c2e0bd59ce0438fcad61b0468fd939c6282d048
URL: https://github.com/llvm/llvm-project/commit/9c2e0bd59ce0438fcad61b0468fd939c6282d048
DIFF: https://github.com/llvm/llvm-project/commit/9c2e0bd59ce0438fcad61b0468fd939c6282d048.diff
LOG: [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;
}
Added:
llvm/test/CodeGen/PowerPC/mtvsrbmi.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/PowerPC/mtvsrbmi.ll b/llvm/test/CodeGen/PowerPC/mtvsrbmi.ll
new file mode 100644
index 0000000000000..7ed57c300ec71
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/mtvsrbmi.ll
@@ -0,0 +1,44 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; 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;
+; }
+
+; RUN: llc < %s -ppc-asm-full-reg-names -mtriple=powerpc-ibm-aix -mcpu=pwr10 -verify-machineinstrs \
+; RUN: | FileCheck %s --check-prefix=CHECK
+
+define dso_local noundef range(i8 -1, 1) <16 x i8> @_Z5v00FFv() {
+; CHECK-LABEL: _Z5v00FFv:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, L..C0(r2) # %const.0
+; CHECK-NEXT: lxv vs34, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ 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>
+}
+
+; CHECK: L..CPI0_0:
+; CHECK-NEXT: .byte 255 # 0xff
+; CHECK-NEXT: .byte 0 # 0x0
+; CHECK-NEXT: .byte 0 # 0x0
+; CHECK-NEXT: .byte 0 # 0x0
+; CHECK-NEXT: .byte 0 # 0x0
+; CHECK-NEXT: .byte 0 # 0x0
+; CHECK-NEXT: .byte 0 # 0x0
+; CHECK-NEXT: .byte 0 # 0x0
+; CHECK-NEXT: .byte 0 # 0x0
+; CHECK-NEXT: .byte 0 # 0x0
+; CHECK-NEXT: .byte 0 # 0x0
+; CHECK-NEXT: .byte 0 # 0x0
+; CHECK-NEXT: .byte 0 # 0x0
+; CHECK-NEXT: .byte 0 # 0x0
+; CHECK-NEXT: .byte 0 # 0x0
+; CHECK-NEXT: .byte 0 # 0x0
+
+; CHECK: ._Z5v00FFv:
+; CHECK-NEXT: # %bb.0:
+; CHECK-NEXT: lwz r3, L..C0(r2)
+; CHECK-NEXT: lxv vs34, 0(r3)
+; CHECK-NEXT: blr
More information about the llvm-commits
mailing list