Skip to content

[ValueTypes][NFC] Generate EVT::getTypeForEVT from GenVT.inc #96608

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 14 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
18 changes: 10 additions & 8 deletions llvm/include/llvm/CodeGen/ValueTypes.td
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
class ValueType<int size, int value> {
string Namespace = "MVT";
string LLVMName = NAME;
string LLVMTy = "";
int Size = size;
int Value = value;
int nElem = 1;
Expand All @@ -37,8 +38,9 @@ class VTInt<int size, int value>
let isInteger = true;
}

class VTFP<int size, int value>
class VTFP<int size, string llvmty, int value>
: ValueType<size, value> {
let LLVMTy = llvmty;
let isFP = true;
}

Expand Down Expand Up @@ -71,13 +73,13 @@ def i32 : VTInt<32, 7>; // 32-bit integer value
def i64 : VTInt<64, 8>; // 64-bit integer value
def i128 : VTInt<128, 9>; // 128-bit integer value

def bf16 : VTFP<16, 10>; // 16-bit brain floating point value
def f16 : VTFP<16, 11>; // 16-bit floating point value
def f32 : VTFP<32, 12>; // 32-bit floating point value
def f64 : VTFP<64, 13>; // 64-bit floating point value
def f80 : VTFP<80, 14>; // 80-bit floating point value
def f128 : VTFP<128, 15>; // 128-bit floating point value
def ppcf128 : VTFP<128, 16>; // PPC 128-bit floating point value
def bf16 : VTFP<16, "BFloatTy", 10>; // 16-bit brain floating point value
def f16 : VTFP<16, "HalfTy", 11>; // 16-bit floating point value
def f32 : VTFP<32, "FloatTy", 12>; // 32-bit floating point value
def f64 : VTFP<64, "DoubleTy", 13>; // 64-bit floating point value
def f80 : VTFP<80, "X86_FP80Ty", 14>; // 80-bit floating point value
def f128 : VTFP<128, "FP128Ty", 15>; // 128-bit floating point value
def ppcf128 : VTFP<128, "PPC_FP128Ty", 16>; // PPC 128-bit floating point value

def v1i1 : VTVec<1, i1, 17>; // 1 x i1 vector value
def v2i1 : VTVec<2, i1, 18>; // 2 x i1 vector value
Expand Down
Loading
Loading