[PATCH] D71351: [AArch64][SVE] Remove nxv1f32 and nxv1f64 as legal types
Cullen Rhodes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 11 06:12:19 PST 2019
c-rhodes created this revision.
c-rhodes added reviewers: sdesmalen, cameron.mcinally, efriedma.
Herald added subscribers: psnobl, rkruppe, hiraditya, kristof.beyls, tschuett.
Herald added a project: LLVM.
Also cleans up ZPR register class definition.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71351
Files:
llvm/lib/Target/AArch64/AArch64CallingConvention.td
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64RegisterInfo.td
Index: llvm/lib/Target/AArch64/AArch64RegisterInfo.td
===================================================================
--- llvm/lib/Target/AArch64/AArch64RegisterInfo.td
+++ llvm/lib/Target/AArch64/AArch64RegisterInfo.td
@@ -858,35 +858,19 @@
//******************************************************************************
-// SVE vector register class
-def ZPR : RegisterClass<"AArch64",
- [nxv16i8, nxv8i16, nxv4i32, nxv2i64,
- nxv2f16, nxv4f16, nxv8f16,
- nxv1f32, nxv2f32, nxv4f32,
- nxv1f64, nxv2f64],
- 128, (sequence "Z%u", 0, 31)> {
+// SVE vector register classes
+class ZPRClass<int lastreg> : RegisterClass<"AArch64",
+ [nxv16i8, nxv8i16, nxv4i32, nxv2i64,
+ nxv2f16, nxv4f16, nxv8f16,
+ nxv2f32, nxv4f32,
+ nxv2f64],
+ 128, (sequence "Z%u", 0, lastreg)> {
let Size = 128;
}
-// SVE restricted 4 bit scalable vector register class
-def ZPR_4b : RegisterClass<"AArch64",
- [nxv16i8, nxv8i16, nxv4i32, nxv2i64,
- nxv2f16, nxv4f16, nxv8f16,
- nxv1f32, nxv2f32, nxv4f32,
- nxv1f64, nxv2f64],
- 128, (sequence "Z%u", 0, 15)> {
- let Size = 128;
-}
-
-// SVE restricted 3 bit scalable vector register class
-def ZPR_3b : RegisterClass<"AArch64",
- [nxv16i8, nxv8i16, nxv4i32, nxv2i64,
- nxv2f16, nxv4f16, nxv8f16,
- nxv1f32, nxv2f32, nxv4f32,
- nxv1f64, nxv2f64],
- 128, (sequence "Z%u", 0, 7)> {
- let Size = 128;
-}
+def ZPR : ZPRClass<31>;
+def ZPR_4b : ZPRClass<15>; // Restricted 4 bit SVE vector register class.
+def ZPR_3b : ZPRClass<7>; // Restricted 3 bit SVE vector register class.
class ZPRAsmOperand<string name, int Width, string RegClassSuffix = "">
: AsmOperandClass {
Index: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -178,10 +178,8 @@
addRegisterClass(MVT::nxv2f16, &AArch64::ZPRRegClass);
addRegisterClass(MVT::nxv4f16, &AArch64::ZPRRegClass);
addRegisterClass(MVT::nxv8f16, &AArch64::ZPRRegClass);
- addRegisterClass(MVT::nxv1f32, &AArch64::ZPRRegClass);
addRegisterClass(MVT::nxv2f32, &AArch64::ZPRRegClass);
addRegisterClass(MVT::nxv4f32, &AArch64::ZPRRegClass);
- addRegisterClass(MVT::nxv1f64, &AArch64::ZPRRegClass);
addRegisterClass(MVT::nxv2f64, &AArch64::ZPRRegClass);
for (auto VT : { MVT::nxv16i8, MVT::nxv8i16, MVT::nxv4i32, MVT::nxv2i64 }) {
Index: llvm/lib/Target/AArch64/AArch64CallingConvention.td
===================================================================
--- llvm/lib/Target/AArch64/AArch64CallingConvention.td
+++ llvm/lib/Target/AArch64/AArch64CallingConvention.td
@@ -75,10 +75,10 @@
CCIfConsecutiveRegs<CCCustom<"CC_AArch64_Custom_Block">>,
CCIfType<[nxv16i8, nxv8i16, nxv4i32, nxv2i64, nxv2f16, nxv4f16, nxv8f16,
- nxv1f32, nxv2f32, nxv4f32, nxv1f64, nxv2f64],
+ nxv2f32, nxv4f32, nxv2f64],
CCAssignToReg<[Z0, Z1, Z2, Z3, Z4, Z5, Z6, Z7]>>,
CCIfType<[nxv16i8, nxv8i16, nxv4i32, nxv2i64, nxv2f16, nxv4f16, nxv8f16,
- nxv1f32, nxv2f32, nxv4f32, nxv1f64, nxv2f64],
+ nxv2f32, nxv4f32, nxv2f64],
CCPassIndirect<i64>>,
CCIfType<[nxv2i1, nxv4i1, nxv8i1, nxv16i1],
@@ -155,7 +155,7 @@
CCAssignToReg<[Q0, Q1, Q2, Q3, Q4, Q5, Q6, Q7]>>,
CCIfType<[nxv16i8, nxv8i16, nxv4i32, nxv2i64, nxv2f16, nxv4f16, nxv8f16,
- nxv1f32, nxv2f32, nxv4f32, nxv1f64, nxv2f64],
+ nxv2f32, nxv4f32, nxv2f64],
CCAssignToReg<[Z0, Z1, Z2, Z3, Z4, Z5, Z6, Z7]>>,
CCIfType<[nxv2i1, nxv4i1, nxv8i1, nxv16i1],
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71351.233341.patch
Type: text/x-patch
Size: 4197 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191211/bb30330d/attachment.bin>
More information about the llvm-commits
mailing list