[llvm] Fix parsing out-of-order ValueInfos (PR #73239)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 27 08:08:32 PST 2023


================
@@ -0,0 +1,22 @@
+; RUN: llvm-as %s -o - | llvm-dis -o - | FileCheck %s
+
+; CHECK: ^[[NUM:[0-9]+]] = gv: {{.*}} "_ZTSN3FooE"
+; CHECK: ^[[NUM]] = typeidCompatibleVTable: {{.*}} "_ZTSN3FooE"
+
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+$_ZTSN3FooE = comdat any
+
+ at _ZTSN3FooE = linkonce_odr constant [7 x i8] c"N3FooE\00", comdat, align 1
+@"_ZTVN3FooE" = internal unnamed_addr constant { [2 x ptr] } { [2 x ptr] [ptr null, ptr @"_Z3barv"] }, align 8
+
+define internal i32 @"_Z3barv"() {
+  ret i32 0
+}
+
+^0 = module: (path: "thinlto-typeid.ll", hash: (0, 0, 0, 0, 0))
+^1 = gv: (name: "_ZTVN3FooE", summaries: (variable: (module: ^0, flags: (linkage: internal, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 1, canAutoHide: 0), varFlags: (readonly: 1, writeonly: 0, constant: 1, vcall_visibility: 0), vTableFuncs: ((virtFunc: ^3, offset: 16)))))
+^4 = gv: (name: "_ZTSN3FooE", summaries: (variable: (module: ^0, flags: (linkage: linkonce_odr, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0, canAutoHide: 0), varFlags: (readonly: 0, writeonly: 0, constant: 1))))
----------------
teresajohnson wrote:

Is this actually a bug on the assembly printer side? I.e. this should be ^2, I don't think it makes sense to print two summaries with the same identifier.

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


More information about the llvm-commits mailing list