Skip to content

Commit

Permalink
[AArch64][SME2] Enable CLAMP multi-vector builtins for SME2 (#72272)
Browse files Browse the repository at this point in the history
Thing change add builtins for SME2:
    sclamp.single.x2
    uclamp.single.x2
    fclamp.single.x2
    sclamp.single.x4
    uclamp.single.x4
    fclamp.single.x4

Patch by: Hassnaa Hamdi <hassnaa.hamdi@arm.com>
  • Loading branch information
dtemirbulatov committed Nov 29, 2023
1 parent 1a5af34 commit 3c00c8c
Show file tree
Hide file tree
Showing 2 changed files with 757 additions and 0 deletions.
10 changes: 10 additions & 0 deletions clang/include/clang/Basic/arm_sve.td
Original file line number Diff line number Diff line change
Expand Up @@ -2101,6 +2101,16 @@ let TargetGuard = "sme2" in {
defm SVMAXNM : SInstMinMaxByVector<"max">;
}

let TargetGuard = "sme2" in {
def SVSCLAMP_X2 : SInst<"svclamp[_single_{d}_x2]", "22dd", "csil", MergeNone, "aarch64_sve_sclamp_single_x2", [IsStreaming], []>;
def SVUCLAMP_X2 : SInst<"svclamp[_single_{d}_x2]", "22dd", "UcUsUiUl", MergeNone, "aarch64_sve_uclamp_single_x2", [IsStreaming], []>;
def SVFCLAMP_X2 : SInst<"svclamp[_single_{d}_x2]", "22dd", "hfd", MergeNone, "aarch64_sve_fclamp_single_x2", [IsStreaming], []>;

def SVSCLAMP_X4 : SInst<"svclamp[_single_{d}_x4]", "44dd", "csil", MergeNone, "aarch64_sve_sclamp_single_x4", [IsStreaming], []>;
def SVUCLAMP_X4 : SInst<"svclamp[_single_{d}_x4]", "44dd", "UcUsUiUl", MergeNone, "aarch64_sve_uclamp_single_x4", [IsStreaming], []>;
def SVFCLAMP_X4 : SInst<"svclamp[_single_{d}_x4]", "44dd", "hfd", MergeNone, "aarch64_sve_fclamp_single_x4", [IsStreaming], []>;
}

let TargetGuard = "sme2" in {
// == ADD (vectors) ==
def SVADD_SINGLE_X2 : SInst<"svadd[_single_{d}_x2]", "22d", "cUcsUsiUilUl", MergeNone, "aarch64_sve_add_single_x2", [IsStreaming], []>;
Expand Down

0 comments on commit 3c00c8c

Please sign in to comment.