[llvm] Revert "[llvm] Fix assertion error where we didn't check fixed point types." (PR #82285)

Vladimir Vereschaka via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 14:42:12 PST 2024


https://github.com/vvereschaka created https://github.com/llvm/llvm-project/pull/82285

These changes break the `LLVM::fixed-point.ll` test some targets what fails the builds for those targets
(more details https://github.com/llvm/llvm-project/pull/80757#issuecomment-1949382211)

The problem wasn't fixed for few days,

Reverts llvm/llvm-project#80757


>From 7c6d53889542967be1323799b152a992bf3b916f Mon Sep 17 00:00:00 2001
From: Vladimir Vereschaka <56896368+vvereschaka at users.noreply.github.com>
Date: Mon, 19 Feb 2024 14:32:30 -0800
Subject: [PATCH] =?UTF-8?q?Revert=20"[llvm]=20Fix=20assertion=20error=20wh?=
 =?UTF-8?q?ere=20we=20didn't=20check=20fixed=20point=20types.=20(=E2=80=A6?=
 =?UTF-8?q?"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit 1807e02b8c280af10628538d69e9511d3df3ed5f.
---
 .../CodeGen/AsmPrinter/DebugHandlerBase.cpp   |  3 --
 llvm/test/DebugInfo/fixed-point.ll            | 31 -------------------
 2 files changed, 34 deletions(-)
 delete mode 100644 llvm/test/DebugInfo/fixed-point.ll

diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
index f00ff1565c665f..eb2d992c7e75e7 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
@@ -224,15 +224,12 @@ bool DebugHandlerBase::isUnsignedDIType(const DIType *Ty) {
           Encoding == dwarf::DW_ATE_float || Encoding == dwarf::DW_ATE_UTF ||
           Encoding == dwarf::DW_ATE_boolean ||
           Encoding == dwarf::DW_ATE_complex_float ||
-          Encoding == dwarf::DW_ATE_signed_fixed ||
-          Encoding == dwarf::DW_ATE_unsigned_fixed ||
           (Ty->getTag() == dwarf::DW_TAG_unspecified_type &&
            Ty->getName() == "decltype(nullptr)")) &&
          "Unsupported encoding");
   return Encoding == dwarf::DW_ATE_unsigned ||
          Encoding == dwarf::DW_ATE_unsigned_char ||
          Encoding == dwarf::DW_ATE_UTF || Encoding == dwarf::DW_ATE_boolean ||
-         Encoding == llvm::dwarf::DW_ATE_unsigned_fixed ||
          Ty->getTag() == dwarf::DW_TAG_unspecified_type;
 }
 
diff --git a/llvm/test/DebugInfo/fixed-point.ll b/llvm/test/DebugInfo/fixed-point.ll
deleted file mode 100644
index 0de984484c0e60..00000000000000
--- a/llvm/test/DebugInfo/fixed-point.ll
+++ /dev/null
@@ -1,31 +0,0 @@
-;; This fixes https://github.com/llvm/llvm-project/issues/81555
-; RUN: %llc_dwarf %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s
-; RUN: %llc_dwarf %s -filetype=obj -o - | llvm-dwarfdump - -verify | FileCheck %s --check-prefix=VERIFY
-
-; VERIFY-NOT: error:
-
-; CHECK: {{.*}}:   DW_TAG_base_type
-; CHECK-NEXT:          DW_AT_name  ("var")
-; CHECK-NEXT:          DW_AT_encoding  (DW_ATE_signed_fixed)
-define void @func() !dbg !26 {
-entry:
-  %classifier = alloca i32, align 4
-  tail call void @llvm.dbg.value(metadata i32 32768, metadata !37, metadata !DIExpression()), !dbg !39
-  store i32 32768, ptr %classifier, align 4, !dbg !39
-  ret void
-}
-
-declare void @llvm.dbg.value(metadata, metadata, metadata)
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!19}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, emissionKind: FullDebug)
-!1 = !DIFile(filename: "a", directory: "")
-!6 = !DIBasicType(name: "var", size: 32, encoding: DW_ATE_signed_fixed)
-!19 = !{i32 2, !"Debug Info Version", i32 3}
-!3 = !DISubroutineType(types: null)
-!26 = distinct !DISubprogram(unit: !0, type: !3)
-!37 = !DILocalVariable(name: "intercept", arg: 2, scope: !26, file: !1, line: 7, type: !6)
-!39 = !DILocation(line: 0, scope: !26)
-



More information about the llvm-commits mailing list