[llvm] [llvm] don't merge constants with COMDAT (PR #192477)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 20 06:35:00 PDT 2026
================
@@ -0,0 +1,18 @@
+; RUN: opt -passes=constmerge -S < %s | FileCheck %s
+
+; @ComdatGlobal can be merged into @RegularGlobal which does not have
+; a comdat group and should not get dropped by the linker
+
+$test = comdat any
+
+ at ComdatGlobal = private unnamed_addr constant i32 111, comdat($test)
+ at RegularGlobal = constant i32 111
----------------
8051Enthusiast wrote:
sure, added
https://github.com/llvm/llvm-project/pull/192477
More information about the llvm-commits
mailing list