Skip to content

Commit

Permalink
[Clang][XTHeadVector] implement 12.7 `vmseq/vmsne/vmslt/vmsgt/vmsle/v…
Browse files Browse the repository at this point in the history
…msge` (llvm#78)

* [Clang][XTHeadVector] implement 12.7 `vmseq/vmsne/vmslt/vmsgt/vmsle/vmsge`

* [Clang][XTHeadVector] test 12.7 `vmseq/vmsne/vmslt/vmsgt/vmsle/vmsge`
  • Loading branch information
imkiva authored and RevySR committed Apr 3, 2024
1 parent 3cbf36a commit 8aafd2c
Show file tree
Hide file tree
Showing 9 changed files with 6,483 additions and 0 deletions.
27 changes: 27 additions & 0 deletions clang/include/clang/Basic/riscv_vector_xtheadv.td
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,20 @@ let Log2LMUL = [-3, -2, -1, 0, 1, 2] in {
["wx", "Uv", "UvUwz"]]>;
}

multiclass RVVSignedMaskOutBuiltinSet
: RVVOp0Op1BuiltinSet<NAME, "csil",
[["vv", "vm", "mvv"],
["vx", "vm", "mve"]]>;

multiclass RVVUnsignedMaskOutBuiltinSet
: RVVOp0Op1BuiltinSet<NAME, "csil",
[["vv", "Uvm", "mUvUv"],
["vx", "Uvm", "mUvUe"]]>;

multiclass RVVIntMaskOutBuiltinSet
: RVVSignedMaskOutBuiltinSet,
RVVUnsignedMaskOutBuiltinSet;

//===----------------------------------------------------------------------===//
// 6. Configuration-Setting and Utility
//===----------------------------------------------------------------------===//
Expand Down Expand Up @@ -1030,6 +1044,19 @@ let UnMaskedPolicyScheme = HasPassthruOperand in {
}

// 12.7. Vector Integer Comparison Operations
let MaskedPolicyScheme = HasPassthruOperand,
HasTailPolicy = false in {
defm th_vmseq : RVVIntMaskOutBuiltinSet;
defm th_vmsne : RVVIntMaskOutBuiltinSet;
defm th_vmsltu : RVVUnsignedMaskOutBuiltinSet;
defm th_vmslt : RVVSignedMaskOutBuiltinSet;
defm th_vmsleu : RVVUnsignedMaskOutBuiltinSet;
defm th_vmsle : RVVSignedMaskOutBuiltinSet;
defm th_vmsgtu : RVVUnsignedMaskOutBuiltinSet;
defm th_vmsgt : RVVSignedMaskOutBuiltinSet;
defm th_vmsgeu : RVVUnsignedMaskOutBuiltinSet;
defm th_vmsge : RVVSignedMaskOutBuiltinSet;
}

// 12.8. Vector Integer Min/Max Operations
let MaskedPolicyScheme = HasPassthruOperand,
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 8aafd2c

Please sign in to comment.