Skip to content

[RISCV] Move TargetOverlapConstraintType from RISCVVPseudo to TSFlags. NFC #75877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ enum {

UsesVXRMShift = HasRoundModeOpShift + 1,
UsesVXRMMask = 1 << UsesVXRMShift,

// Indicates whether these instructions can partially overlap between source
// registers and destination registers according to the vector spec.
// 0 -> not a vector pseudo
// 1 -> default value for vector pseudos. not widening or narrowing.
// 2 -> narrowing case
// 3 -> widening case
TargetOverlapConstraintTypeShift = UsesVXRMShift + 1,
TargetOverlapConstraintTypeMask = 3ULL << TargetOverlapConstraintTypeShift,
};

enum VLMUL : uint8_t {
Expand Down
9 changes: 9 additions & 0 deletions llvm/lib/Target/RISCV/RISCVInstrFormats.td
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,15 @@ class RVInstCommon<dag outs, dag ins, string opcodestr, string argstr,
// to the correct CSR.
bit UsesVXRM = 0;
let TSFlags{20} = UsesVXRM;

// Indicates whther these instructions can partially overlap between source
// registers and destination registers according to the vector spec.
// 0 -> not a vector pseudo
// 1 -> default value for vector pseudos. not widening or narrowing.
// 2 -> narrowing case
// 3 -> widening case
bits<2> TargetOverlapConstraintType = 0;
let TSFlags{22-21} = TargetOverlapConstraintType;
}

class RVInst<dag outs, dag ins, string opcodestr, string argstr,
Expand Down
8 changes: 0 additions & 8 deletions llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
Original file line number Diff line number Diff line change
Expand Up @@ -529,14 +529,6 @@ class RISCVVPseudo {
// SEW = 0 is used to denote that the Pseudo is not SEW specific (or unknown).
bits<8> SEW = 0;
bit NeedBeInPseudoTable = 1;
// TargetOverlapConstraintType indicates that these instructions can
// overlap between source operands and destination operands.
// 1 -> default value, remain current constraint
// 2 -> narrow case
// 3 -> widen case
// TODO: Add TargetOverlapConstraintType into PseudosTable for further
// query.
bits<2> TargetOverlapConstraintType = 1;
}

// The actual table.
Expand Down