[clang] [llvm] [AArch64][SVE] Change the immediate argument in svextq (PR #115340)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 14 04:12:27 PST 2024
================
@@ -2286,7 +2286,7 @@ let SVETargetGuard = "sve2p1", SMETargetGuard = InvalidMode in {
def SVTBLQ : SInst<"svtblq[_{d}]", "ddu", "cUcsUsiUilUlbhfd", MergeNone, "aarch64_sve_tblq">;
def SVTBXQ : SInst<"svtbxq[_{d}]", "dddu", "cUcsUsiUilUlbhfd", MergeNone, "aarch64_sve_tbxq">;
// EXTQ
- def EXTQ : SInst<"svextq[_{d}]", "dddk", "cUcsUsiUilUlbhfd", MergeNone, "aarch64_sve_extq", [], [ImmCheck<2, ImmCheck0_15>]>;
+ def EXTQ : SInst<"svextq[_{d}]", "dddk", "cUcsUsiUilUlbhfd", MergeNone, "aarch64_sve_extq", [], [ImmCheck<2, ImmCheckLaneIndex, 0>]>;
----------------
SpencerAbson wrote:
[`extq` ](https://developer.arm.com/documentation/ddi0602/2024-09/SVE-Instructions/EXTQ--Extract-vector-segment-from-each-pair-of-quadword-vector-segments-?lang=en) differs from [`ext`](https://developer.arm.com/documentation/ddi0602/2024-09/SVE-Instructions/EXT--Extract-vector-from-pair-of-vectors-?lang=en) in that the immediate is relative to a single 128-bit vector segment, rather than the possibly 2048-bit vector.
We have `ImmCheckExtact` for `ext`:
>`def ImmCheckExtract : ImmCheckType<2>; // 0..(2048/sizeinbits(elt) - 1)`
But I believe we need to use `ImmCheckLaneIndex` here
> `def ImmCheckExtract : ImmCheckType<2>; // 0..(2048/sizeinbits(elt) - 1)`
https://github.com/llvm/llvm-project/pull/115340
More information about the cfe-commits
mailing list