llvm-project/llvm/test/CodeGen/LoongArch/lsx/intrinsic-permi.ll
chenli f3aa441631 [LoongArch] Add LSX intrinsic testcases
Depends on D155829

Reviewed By: SixWeining

Differential Revision: https://reviews.llvm.org/D155834
2023-08-19 17:10:46 +08:00

15 lines
539 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s
declare <4 x i32> @llvm.loongarch.lsx.vpermi.w(<4 x i32>, <4 x i32>, i32)
define <4 x i32> @lsx_vpermi_w(<4 x i32> %va, <4 x i32> %vb) nounwind {
; CHECK-LABEL: lsx_vpermi_w:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vpermi.w $vr0, $vr1, 255
; CHECK-NEXT: ret
entry:
%res = call <4 x i32> @llvm.loongarch.lsx.vpermi.w(<4 x i32> %va, <4 x i32> %vb, i32 255)
ret <4 x i32> %res
}