Files
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm
bindings
cmake
docs
examples
include
lib
projects
resources
runtimes
scripts
test
Analysis
Assembler
Bindings
Bitcode
BugPoint
CodeGen
DebugInfo
Examples
ExecutionEngine
Feature
FileCheck
Instrumentation
Integer
JitListener
LTO
Linker
MC
Object
ObjectYAML
Other
SafepointIRVerifier
SymbolRewriter
TableGen
ThinLTO
Transforms
ADCE
AddDiscriminators
AlignmentFromAssumptions
ArgumentPromotion
AtomicExpand
BDCE
BranchFolding
CallSiteSplitting
CalledValuePropagation
CodeExtractor
CodeGenPrepare
ConstProp
ConstantHoisting
ConstantMerge
Coroutines
CorrelatedValuePropagation
CrossDSOCFI
DCE
DeadArgElim
DeadStoreElimination
DivRemPairs
EarlyCSE
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp
Float2Int
ForcedFunctionAttrs
FunctionAttrs
FunctionImport
GCOVProfiling
GVN
GVNHoist
GVNSink
GlobalDCE
GlobalMerge
GlobalOpt
GlobalSplit
GuardWidening
IPConstantProp
IRCE
IndVarSimplify
IndirectBrExpand
InferAddressSpaces
InferFunctionAttrs
Inline
InstCombine
InstMerge
InstNamer
InstSimplify
InterleavedAccess
Internalize
JumpThreading
LCSSA
LICM
LoadStoreVectorizer
LoopDataPrefetch
LoopDeletion
LoopDistribute
LoopIdiom
LoopInterchange
LoopLoadElim
LoopPredication
LoopReroll
LoopRotate
LoopSimplify
LoopSimplifyCFG
LoopStrengthReduce
LoopUnroll
LoopUnswitch
LoopVectorize
LoopVersioning
LoopVersioningLICM
LowerAtomic
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerSwitch
LowerTypeTests
Mem2Reg
MemCpyOpt
MergeFunc
MergeICmps
MetaRenamer
NameAnonGlobals
NaryReassociate
NewGVN
ObjCARC
PGOProfile
PartiallyInlineLibCalls
PhaseOrdering
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH
Reassociate
Reg2Mem
RewriteStatepointsForGC
SCCP
SLPVectorizer
SROA
SafeStack
SampleProfile
Scalarizer
SeparateConstOffsetFromGEP
SimpleLoopUnswitch
SimplifyCFG
Sink
SpeculateAroundPHIs
SpeculativeExecution
StraightLineStrengthReduce
StripDeadPrototypes
StripSymbols
StructurizeCFG
TailCallElim
ThinLTOBitcodeWriter
circular-reference.ll
comdat.ll
filter-alias.ll
new-pm.ll
no-type-md.ll
pr33536.ll
split-internal-typeid.ll
split-internal1.ll
split-internal2.ll
split-vfunc-internal.ll
split-vfunc.ll
split.ll
unsplittable.ll
Util
WholeProgramDevirt
Unit
Verifier
YAMLParser
tools
.clang-format
CMakeLists.txt
TestRunner.sh
lit.cfg.py
lit.site.cfg.py.in
tools
unittests
utils
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
libgc
llvm
m4
man
mcs
mk
mono
msvc
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h

81 lines
2.7 KiB
LLVM
Raw Normal View History

; RUN: opt -thinlto-bc -o %t %s
; RUN: llvm-modextract -n 0 -o - %t | llvm-dis | FileCheck --check-prefix=THIN %s
; RUN: llvm-modextract -n 1 -o - %t | llvm-dis | FileCheck --check-prefix=MERGED %s
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-windows-msvc19.0.24215"
; Internal comdat leader with type metadata. All comdat members need to live
; in the merged module, and the comdat needs to be renamed.
; MERGED: ${{"?lwt[^ ]+}} = comdat any
$lwt = comdat any
; External comdat leader, type metadata on non-leader. All comdat
; members need to live in the merged module, internal members need to
; be renamed.
; MERGED: $nlwt = comdat any
$nlwt = comdat any
; Comdat with two members without type metadata. All comdat members live in
; the ThinLTO module and no renaming needs to take place.
; THIN: $nt = comdat any
$nt = comdat any
; MERGED: @lwt_aliasee = private unnamed_addr global
; MERGED-SAME: comdat(${{"?lwt[^ ]+}})
@lwt_aliasee = private unnamed_addr global [1 x i8*] [i8* null], comdat($lwt), !type !0
; MERGED: {{@"?lwt_nl[^ ]+}} = hidden unnamed_addr global
; MERGED-SAME: comdat(${{"?lwt[^ ]+}})
; THIN: {{@"?lwt_nl[^ ]+}} = external hidden
@lwt_nl = internal unnamed_addr global i32 0, comdat($lwt)
; MERGED: @nlwt_aliasee = private unnamed_addr global
; MERGED-SAME: comdat($nlwt)
@nlwt_aliasee = private unnamed_addr global [1 x i8*] [i8* null], comdat($nlwt), !type !0
; MERGED: @nlwt = unnamed_addr global
; MERGED-SAME: comdat
; THIN: @nlwt = external
@nlwt = unnamed_addr global i32 0, comdat
; THIN: @nt = internal
; THIN-SAME: comdat
@nt = internal unnamed_addr global [1 x i8*] [i8* null], comdat
; THIN: @nt_nl = internal
; THIN-SAME: comdat($nt)
@nt_nl = internal unnamed_addr global i32 0, comdat($nt)
; MERGED: {{@"?lwt[^ ]+}} = hidden unnamed_addr alias
; THIN: {{@"?lwt[^ ]+}} = external hidden
@lwt = internal unnamed_addr alias [1 x i8*], [1 x i8*]* @lwt_aliasee
; MERGED: {{@"?nlwt_nl[^ ]+}} = hidden unnamed_addr alias
; THIN: {{@"?nlwt_nl[^ ]+}} = external hidden
@nlwt_nl = internal unnamed_addr alias [1 x i8*], [1 x i8*]* @nlwt_aliasee
; The functions below exist just to make sure the globals are used.
define i8* @lwt_fun() {
%1 = load i32, i32* @lwt_nl
%2 = getelementptr inbounds [1 x i8*], [1 x i8*]* @lwt, i32 0, i32 %1
%3 = load i8*, i8** %2
ret i8* %3
}
define i8* @nlwt_fun() {
%1 = load i32, i32* @nlwt
%2 = getelementptr inbounds [1 x i8*], [1 x i8*]* @nlwt_nl, i32 0, i32 %1
%3 = load i8*, i8** %2
ret i8* %3
}
define i8* @nt_fun() {
%1 = load i32, i32* @nt_nl
%2 = getelementptr inbounds [1 x i8*], [1 x i8*]* @nt, i32 0, i32 %1
%3 = load i8*, i8** %2
ret i8* %3
}
!0 = !{i64 8, !"?AVA@@"}