[llvm] [ValueTypes][NFC] Generate EVT::getTypeForEVT from GenVT.inc (PR #96608)

Kito Cheng via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 25 17:32:37 PDT 2024


================
@@ -27,6 +27,47 @@ class VTEmitter {
   void run(raw_ostream &OS);
 };
 
+static void VTtoGetLLVMTyString(raw_ostream &OS, const Record *VT) {
+  bool IsVector = VT->getValueAsBit("isVector");
+  if (IsVector)
+    OS << (VT->getValueAsBit("isScalable") ? "Scalable" : "Fixed")
+       << "VectorType::get(";
+
+  auto OutputVT = IsVector ? VT->getValueAsDef("ElementType") : VT;
+  int64_t OutputVTSize = OutputVT->getValueAsInt("Size");
+
+  if (OutputVT->getValueAsBit("isFP")) {
+    StringRef FloatTy = "";
----------------
kito-cheng wrote:

Fixed :)

https://github.com/llvm/llvm-project/pull/96608


More information about the llvm-commits mailing list