File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -387,6 +387,12 @@ class PowerPC_VSX_Sca_DDD_Intrinsic<string GCCIntSuffix>
387387 [llvm_double_ty], [llvm_double_ty, llvm_double_ty],
388388 [IntrNoMem]>;
389389
390+ /// PowerPC_VSX_WWW_Intrinsic - A PowerPC intrinsic that takes two v4i32
391+ /// vectors and returns one. These intrinsics have no side effects.
392+ class PowerPC_VSX_WWW_Intrinsic<string GCCIntSuffix>
393+ : PowerPC_VSX_Intrinsic<GCCIntSuffix,
394+ [llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
395+ [IntrNoMem]>;
390396//===----------------------------------------------------------------------===//
391397// PowerPC Altivec Intrinsic Definitions.
392398
@@ -1214,6 +1220,7 @@ def int_ppc_altivec_vsraw : PowerPC_Vec_WWW_Intrinsic<"vsraw">;
12141220def int_ppc_altivec_vrlb : PowerPC_Vec_BBB_Intrinsic<"vrlb">;
12151221def int_ppc_altivec_vrlh : PowerPC_Vec_HHH_Intrinsic<"vrlh">;
12161222def int_ppc_altivec_vrlw : PowerPC_Vec_WWW_Intrinsic<"vrlw">;
1223+ def int_ppc_vsx_xvrlw : PowerPC_VSX_WWW_Intrinsic<"xvrlw">;
12171224def int_ppc_altivec_vrld : PowerPC_Vec_DDD_Intrinsic<"vrld">;
12181225
12191226let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.".
Original file line number Diff line number Diff line change 1+ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
2+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3+ ; RUN: -mcpu=future -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
4+ ; RUN: FileCheck %s
5+
6+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
7+ ; RUN: -mcpu=future -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
8+ ; RUN: FileCheck %s
9+
10+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-aix \
11+ ; RUN: -mcpu=future -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
12+ ; RUN: FileCheck %s
13+
14+ define <4 x i32 > @testVRLWMI (<4 x i32 > %a , <4 x i32 > %b ) {
15+ ; CHECK-LABEL: testVRLWMI:
16+ ; CHECK: # %bb.0: # %entry
17+ ; CHECK-NEXT: xvrlw v2, v2, v3
18+ ; CHECK-NEXT: blr
19+ entry:
20+ %0 = tail call <4 x i32 > @llvm.ppc.vsx.xvrlw (<4 x i32 > %a , <4 x i32 > %b )
21+ ret <4 x i32 > %0
22+ }
You can’t perform that action at this time.
0 commit comments