Skip to content

Commit

Permalink
[Clang][XTHeadVector] implement 12.11 vwmul/vwmulu/vwmulsu (#83)
Browse files Browse the repository at this point in the history
* [Clang][XTHeadVector] implement 12.11 `vwmul/vwmulu/vwmulsu`

* [Clang][XTHeadVector] test 12.11 `vwmul/vwmulu/vwmulsu`
  • Loading branch information
imkiva authored Mar 20, 2024
1 parent 0861662 commit eead76f
Show file tree
Hide file tree
Showing 4 changed files with 1,114 additions and 0 deletions.
13 changes: 13 additions & 0 deletions clang/include/clang/Basic/riscv_vector_xtheadv.td
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,19 @@ let MaskedPolicyScheme = HasPassthruOperand,
}

// 12.11. Vector Widening Integer Multiply Operations
let Log2LMUL = [-3, -2, -1, 0, 1, 2],
MaskedPolicyScheme = HasPassthruOperand,
UnMaskedPolicyScheme = HasPassthruOperand in {
defm th_vwmul : RVVOutOp0Op1BuiltinSet<"th_vwmul", "csi",
[["vv", "w", "wvv"],
["vx", "w", "wve"]]>;
defm th_vwmulu : RVVOutOp0Op1BuiltinSet<"th_vwmulu", "csi",
[["vv", "Uw", "UwUvUv"],
["vx", "Uw", "UwUvUe"]]>;
defm th_vwmulsu : RVVOutOp0Op1BuiltinSet<"th_vwmulsu", "csi",
[["vv", "w", "wvUv"],
["vx", "w", "wvUe"]]>;
}

// 12.12. Vector Single-Width Integer Multiply-Add Operations

Expand Down
Loading

0 comments on commit eead76f

Please sign in to comment.