llvm-project/llvm/test/CodeGen/PowerPC/p10-vector-mask-ops.ll

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
2.0 KiB
LLVM
Raw Normal View History

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
; RUN: FileCheck %s
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
; RUN: FileCheck %s
; This test case aims to test the vector mask manipulation operations
; on Power10.
declare i32 @llvm.ppc.altivec.vextractbm(<16 x i8>)
declare i32 @llvm.ppc.altivec.vextracthm(<8 x i16>)
declare i32 @llvm.ppc.altivec.vextractwm(<4 x i32>)
declare i32 @llvm.ppc.altivec.vextractdm(<2 x i64>)
declare i32 @llvm.ppc.altivec.vextractqm(<1 x i128>)
define i32 @test_vextractbm(<16 x i8> %a) {
; CHECK-LABEL: test_vextractbm:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vextractbm r3, v2
; CHECK-NEXT: blr
entry:
%ext = tail call i32 @llvm.ppc.altivec.vextractbm(<16 x i8> %a)
ret i32 %ext
}
define i32 @test_vextracthm(<8 x i16> %a) {
; CHECK-LABEL: test_vextracthm:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vextracthm r3, v2
; CHECK-NEXT: blr
entry:
%ext = tail call i32 @llvm.ppc.altivec.vextracthm(<8 x i16> %a)
ret i32 %ext
}
define i32 @test_vextractwm(<4 x i32> %a) {
; CHECK-LABEL: test_vextractwm:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vextractwm r3, v2
; CHECK-NEXT: blr
entry:
%ext = tail call i32 @llvm.ppc.altivec.vextractwm(<4 x i32> %a)
ret i32 %ext
}
define i32 @test_vextractdm(<2 x i64> %a) {
; CHECK-LABEL: test_vextractdm:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vextractdm r3, v2
; CHECK-NEXT: blr
entry:
%ext = tail call i32 @llvm.ppc.altivec.vextractdm(<2 x i64> %a)
ret i32 %ext
}
define i32 @test_vextractqm(<1 x i128> %a) {
; CHECK-LABEL: test_vextractqm:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vextractqm r3, v2
; CHECK-NEXT: blr
entry:
%ext = tail call i32 @llvm.ppc.altivec.vextractqm(<1 x i128> %a)
ret i32 %ext
}