-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64][SVE] Implement punpk[hi|lo] intrinsics
Summary: Adds the following two intrinsics: - int_aarch64_sve_punpkhi - int_aarch64_sve_punpklo This patch also contains a fix which allows LLVMHalfElementsVectorType to forward reference overloadable arguments. Reviewers: sdesmalen, rovka, rengolin Reviewed By: sdesmalen Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, greened, cfe-commits, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67830 llvm-svn: 373232
- Loading branch information
1 parent
8299fd9
commit 01b84e1
Showing
5 changed files
with
95 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
llvm/test/CodeGen/AArch64/sve-intrinsics-pred-operations.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s | ||
|
||
; | ||
; PUNPKHI | ||
; | ||
|
||
define <vscale x 8 x i1> @punpkhi_b16(<vscale x 16 x i1> %a) { | ||
; CHECK-LABEL: punpkhi_b16 | ||
; CHECK: punpkhi p0.h, p0.b | ||
; CHECK-NEXT: ret | ||
%res = call <vscale x 8 x i1> @llvm.aarch64.sve.punpkhi.nxv8i1(<vscale x 16 x i1> %a) | ||
ret <vscale x 8 x i1> %res | ||
} | ||
|
||
define <vscale x 4 x i1> @punpkhi_b8(<vscale x 8 x i1> %a) { | ||
; CHECK-LABEL: punpkhi_b8 | ||
; CHECK: punpkhi p0.h, p0.b | ||
; CHECK-NEXT: ret | ||
%res = call <vscale x 4 x i1> @llvm.aarch64.sve.punpkhi.nxv4i1(<vscale x 8 x i1> %a) | ||
ret <vscale x 4 x i1> %res | ||
} | ||
|
||
define <vscale x 2 x i1> @punpkhi_b4(<vscale x 4 x i1> %a) { | ||
; CHECK-LABEL: punpkhi_b4 | ||
; CHECK: punpkhi p0.h, p0.b | ||
; CHECK-NEXT: ret | ||
%res = call <vscale x 2 x i1> @llvm.aarch64.sve.punpkhi.nxv2i1(<vscale x 4 x i1> %a) | ||
ret <vscale x 2 x i1> %res | ||
} | ||
|
||
; | ||
; PUNPKLO | ||
; | ||
|
||
define <vscale x 8 x i1> @punpklo_b16(<vscale x 16 x i1> %a) { | ||
; CHECK-LABEL: punpklo_b16 | ||
; CHECK: punpklo p0.h, p0.b | ||
; CHECK-NEXT: ret | ||
%res = call <vscale x 8 x i1> @llvm.aarch64.sve.punpklo.nxv8i1(<vscale x 16 x i1> %a) | ||
ret <vscale x 8 x i1> %res | ||
} | ||
|
||
define <vscale x 4 x i1> @punpklo_b8(<vscale x 8 x i1> %a) { | ||
; CHECK-LABEL: punpklo_b8 | ||
; CHECK: punpklo p0.h, p0.b | ||
; CHECK-NEXT: ret | ||
%res = call <vscale x 4 x i1> @llvm.aarch64.sve.punpklo.nxv4i1(<vscale x 8 x i1> %a) | ||
ret <vscale x 4 x i1> %res | ||
} | ||
|
||
define <vscale x 2 x i1> @punpklo_b4(<vscale x 4 x i1> %a) { | ||
; CHECK-LABEL: punpklo_b4 | ||
; CHECK: punpklo p0.h, p0.b | ||
; CHECK-NEXT: ret | ||
%res = call <vscale x 2 x i1> @llvm.aarch64.sve.punpklo.nxv2i1(<vscale x 4 x i1> %a) | ||
ret <vscale x 2 x i1> %res | ||
} | ||
|
||
declare <vscale x 8 x i1> @llvm.aarch64.sve.punpkhi.nxv8i1(<vscale x 16 x i1>) | ||
declare <vscale x 4 x i1> @llvm.aarch64.sve.punpkhi.nxv4i1(<vscale x 8 x i1>) | ||
declare <vscale x 2 x i1> @llvm.aarch64.sve.punpkhi.nxv2i1(<vscale x 4 x i1>) | ||
|
||
declare <vscale x 8 x i1> @llvm.aarch64.sve.punpklo.nxv8i1(<vscale x 16 x i1>) | ||
declare <vscale x 4 x i1> @llvm.aarch64.sve.punpklo.nxv4i1(<vscale x 8 x i1>) | ||
declare <vscale x 2 x i1> @llvm.aarch64.sve.punpklo.nxv2i1(<vscale x 4 x i1>) |