forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LLVM][XTHeadVector] Implement intrinsics for
vmerge
and `vmv.v.x/i…
…`. (llvm#72) * [LLVM][XTHeadVector] Define intrinsic functions for vmerge and vmv.v.{x,i}. * [LLVM][XTHeadVector] Define pseudos and pats for vmerge. * [LLVM][XTHeadVector] Add test cases for vmerge. * [LLVM][XTHeadVector] Define policy-free pseudo nodes for vmv.v.{v/x/i}. Define pats for vmv.v.v. * [LLVM][XTHeadVector] Define ISD node for vmv.v.x and map it to pseudo nodes. * [LLVM][XTHeadVector] Select vmv.v.x using logic shared with its 1.0 version. * [LLVM][XTHeadVector] Don't add policy for xthead pseudo nodes. * [LLVM][XTHeadVector] Add test cases for vmv.v.x. * [LLVM][XTHeadVector] Update test cases since now pseudo vmv do not accept policy fields any more. * [NFC][XTHeadVector] Update readme.
- Loading branch information
1 parent
ea1dc1b
commit 99ef8b1
Showing
12 changed files
with
3,613 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//===-- RISCVInstrInfoXTHeadVVLPatterns.td - RVV VL patterns -----*- tablegen -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------------===// | ||
/// | ||
/// This file contains the required infrastructure and VL patterns to support | ||
/// code generation for the standard 'V' (Vector) extension, version 0.7.1 | ||
/// | ||
/// This file is included from RISCVInstrInfoXTHeadVPseudos.td | ||
//===---------------------------------------------------------------------------===// | ||
|
||
def riscv_th_vmv_v_x_vl : SDNode<"RISCVISD::TH_VMV_V_X_VL", | ||
SDTypeProfile<1, 3, [SDTCisVec<0>, SDTCisInt<0>, | ||
SDTCisSameAs<0, 1>, | ||
SDTCisVT<2, XLenVT>, | ||
SDTCisVT<3, XLenVT>]>>; | ||
|
||
foreach vti = AllXVectors in { | ||
foreach vti = AllIntegerXVectors in { | ||
def : Pat<(vti.Vector (riscv_th_vmv_v_x_vl vti.RegClass:$passthru, GPR:$rs2, VLOpFrag)), | ||
(!cast<Instruction>("PseudoTH_VMV_V_X_"#vti.LMul.MX) | ||
vti.RegClass:$passthru, GPR:$rs2, GPR:$vl, vti.Log2SEW)>; | ||
defvar ImmPat = !cast<ComplexPattern>("sew"#vti.SEW#"simm5"); | ||
def : Pat<(vti.Vector (riscv_th_vmv_v_x_vl vti.RegClass:$passthru, (ImmPat simm5:$imm5), | ||
VLOpFrag)), | ||
(!cast<Instruction>("PseudoTH_VMV_V_I_"#vti.LMul.MX) | ||
vti.RegClass:$passthru, simm5:$imm5, GPR:$vl, vti.Log2SEW)>; | ||
} | ||
} |
Oops, something went wrong.