The instruction MTVSRBMI set 0x00(or 0xFF) to each byte of VSR based on the bits mask. Using the instruction instead of constant pool can reduce the asm code size and instructions in power10.
24 lines
928 B
LLVM
24 lines
928 B
LLVM
; 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-NOT: L..CPI0_0:
|
|
; CHECK-NOT: .byte 255 # 0xff
|
|
; CHECK-NOT: .byte 0 # 0x0
|
|
|
|
; CHECK-LABEL: _Z5v00FFv:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtvsrbmi v2, 1
|
|
; 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>
|
|
}
|