You've already forked linux-packaging-mono
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
AArch64
AMDGPU
ARC
ARM
AVR
BPF
Generic
2002-04-14-UnexpectedUnsignedType.ll
2002-04-16-StackFrameSizeAlignment.ll
2003-05-27-phifcmpd.ll
2003-05-27-useboolinotherbb.ll
2003-05-27-usefsubasbool.ll
2003-05-28-ManyArgs.ll
2003-05-30-BadFoldGEP.ll
2003-05-30-BadPreselectPhi.ll
2003-07-06-BadIntCmp.ll
2003-07-07-BadLongConst.ll
2003-07-08-BadCastToBool.ll
2003-07-29-BadConstSbyte.ll
2004-05-09-LiveVarPartialRegister.ll
2005-01-18-SetUO-InfLoop.ll
2005-04-09-GlobalInPHI.ll
2005-10-18-ZeroSizeStackObject.ll
2005-10-21-longlonggtu.ll
2005-12-01-Crash.ll
2005-12-12-ExpandSextInreg.ll
2006-01-12-BadSetCCFold.ll
2006-01-18-InvalidBranchOpcodeAssert.ll
2006-02-12-InsertLibcall.ll
2006-03-01-dagcombineinfloop.ll
2006-04-26-SetCCAnd.ll
2006-04-28-Sign-extend-bool.ll
2006-05-06-GEP-Cast-Sink-Crash.ll
2006-06-12-LowerSwitchCrash.ll
2006-06-13-ComputeMaskedBitsCrash.ll
2006-06-28-SimplifySetCCCrash.ll
2006-07-03-schedulers.ll
2006-08-30-CoalescerCrash.ll
2006-09-02-LocalAllocCrash.ll
2006-09-06-SwitchLowering.ll
2006-10-27-CondFolding.ll
2006-10-29-Crash.ll
2006-11-20-DAGCombineCrash.ll
2007-01-15-LoadSelectCycle.ll
2007-02-25-invoke.ll
2007-04-08-MultipleFrameIndices.ll
2007-04-13-SwitchLowerBadPhi.ll
2007-04-17-lsr-crash.ll
2007-04-27-InlineAsm-X-Dest.ll
2007-04-27-LargeMemObject.ll
2007-04-30-LandingPadBranchFolding.ll
2007-05-03-EHTypeInfo.ll
2007-05-15-InfiniteRecursion.ll
2007-12-17-InvokeAsm.ll
2007-12-31-UnusedSelector.ll
2008-01-25-dag-combine-mul.ll
2008-01-30-LoadCrash.ll
2008-02-04-Ctlz.ll
2008-02-04-ExtractSubvector.ll
2008-02-20-MatchingMem.ll
2008-02-25-NegateZero.ll
2008-02-26-NegatableCrash.ll
2008-08-07-PtrToInt-SmallerInt.ll
2009-03-17-LSR-APInt.ll
2009-03-29-SoftFloatVectorExtract.ll
2009-04-10-SinkCrash.ll
2009-04-28-i128-cmp-crash.ll
2009-11-16-BadKillsCrash.ll
2010-07-27-DAGCombineCrash.ll
2010-11-04-BigByval.ll
2010-ZeroSizedArg.ll
2011-01-06-BigNumberCrash.ll
2011-07-07-ScheduleDAGCrash.ll
2012-06-08-APIntCrash.ll
2013-03-20-APFloatCrash.ll
2014-02-05-OpaqueConstants.ll
APIntLoadStore.ll
APIntParam.ll
APIntSextParam.ll
APIntZextParam.ll
BasicInstrs.ll
ConstantExprLowering.ll
ForceStackAlign.ll
MachineBranchProb.ll
PBQP.ll
add-with-overflow-128.ll
add-with-overflow-24.ll
add-with-overflow.ll
addr-label.ll
annotate.ll
asm-large-immediate.ll
assume.ll
badCallArgLRLLVM.ll
badFoldGEP.ll
badarg6.ll
bool-to-double.ll
bswap.ll
builtin-expect.ll
call-ret0.ll
call-ret42.ll
call-void.ll
call2-ret0.ll
cast-fp.ll
cfi-sections.ll
constindices.ll
crash.ll
dag-combine-crash.ll
dbg_value.ll
div-neg-power-2.ll
donothing.ll
dont-remove-empty-preheader.ll
edge-bundles-blockIDs.ll
empty-insertvalue.ll
empty-load-store.ll
empty-phi.ll
exception-handling.ll
expand-experimental-reductions.ll
externally_available.ll
fastcall.ll
fneg-fabs.ll
fp-to-int-invalid.ll
fp_to_int.ll
fpowi-promote.ll
fwdtwice.ll
global-ret0.ll
hello.ll
i128-addsub.ll
i128-arith.ll
icmp-illegal.ll
inline-asm-mem-clobber.ll
inline-asm-special-strings.ll
intrinsics.ll
invalid-memcpy.ll
isunord.ll
lit.local.cfg
llc-start-stop.ll
llvm-ct-intrinsics.ll
multiple-return-values-cross-block-with-invoke.ll
negintconst.ll
nested-select.ll
no-target.ll
opt-codegen-no-target-machine.ll
overflow.ll
overloaded-intrinsic-name.ll
pr12507.ll
pr24662.ll
pr2625.ll
pr3288.ll
pr33094.ll
print-add.ll
print-after.ll
print-arith-fp.ll
print-arith-int.ll
print-int.ll
print-machineinstrs.ll
print-mul-exp.ll
print-mul.ll
print-shift.ll
ptr-annotate.ll
ret0.ll
ret42.ll
select-cc.ll
select.ll
shift-int64.ll
stacksave-restore.ll
storetrunc-fp.ll
switch-lower-feature.ll
switch-lower.ll
trap.ll
undef-phi.ll
v-split.ll
vector-casts.ll
vector-constantexpr.ll
vector-identity-shuffle.ll
vector-redux.ll
vector.ll
zero-probability.mir
zero-sized-array.ll
Hexagon
Inputs
Lanai
MIR
MSP430
Mips
NVPTX
Nios2
PowerPC
RISCV
SPARC
SystemZ
Thumb
Thumb2
WebAssembly
WinEH
X86
XCore
DebugInfo
Examples
ExecutionEngine
Feature
FileCheck
Instrumentation
Integer
JitListener
LTO
Linker
MC
Object
ObjectYAML
Other
SafepointIRVerifier
SymbolRewriter
TableGen
ThinLTO
Transforms
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
87 lines
4.7 KiB
LLVM
87 lines
4.7 KiB
LLVM
![]() |
; RUN: opt -verify -S < %s | FileCheck %s
|
||
|
|
||
|
; Tests the name mangling performed by the codepath following
|
||
|
; getMangledTypeStr(). Only tests that code with the various manglings
|
||
|
; run fine: doesn't actually test the mangling with the type of the
|
||
|
; arguments. Meant to serve as an example-document on how the user
|
||
|
; should do name manglings.
|
||
|
|
||
|
; Exercise the most general case, llvm_anyptr_type, using gc.relocate
|
||
|
; and gc.statepoint. Note that it has nothing to do with gc.*
|
||
|
; functions specifically: any function that accepts llvm_anyptr_type
|
||
|
; will serve the purpose.
|
||
|
|
||
|
; function and integer
|
||
|
define i32* @test_iAny(i32* %v) gc "statepoint-example" {
|
||
|
%tok = call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0, i32* %v)
|
||
|
%v-new = call i32* @llvm.experimental.gc.relocate.p0i32(token %tok, i32 7, i32 7)
|
||
|
ret i32* %v-new
|
||
|
}
|
||
|
|
||
|
; float
|
||
|
define float* @test_fAny(float* %v) gc "statepoint-example" {
|
||
|
%tok = call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0, float* %v)
|
||
|
%v-new = call float* @llvm.experimental.gc.relocate.p0f32(token %tok, i32 7, i32 7)
|
||
|
ret float* %v-new
|
||
|
}
|
||
|
|
||
|
; array of integers
|
||
|
define [3 x i32]* @test_aAny([3 x i32]* %v) gc "statepoint-example" {
|
||
|
%tok = call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0, [3 x i32]* %v)
|
||
|
%v-new = call [3 x i32]* @llvm.experimental.gc.relocate.p0a3i32(token %tok, i32 7, i32 7)
|
||
|
ret [3 x i32]* %v-new
|
||
|
}
|
||
|
|
||
|
; vector of integers
|
||
|
define <3 x i32>* @test_vAny(<3 x i32>* %v) gc "statepoint-example" {
|
||
|
%tok = call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0, <3 x i32>* %v)
|
||
|
%v-new = call <3 x i32>* @llvm.experimental.gc.relocate.p0v3i32(token %tok, i32 7, i32 7)
|
||
|
ret <3 x i32>* %v-new
|
||
|
}
|
||
|
|
||
|
%struct.test = type { i32, i1 }
|
||
|
|
||
|
; struct
|
||
|
define %struct.test* @test_struct(%struct.test* %v) gc "statepoint-example" {
|
||
|
%tok = call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0, %struct.test* %v)
|
||
|
%v-new = call %struct.test* @llvm.experimental.gc.relocate.p0s_struct.tests(token %tok, i32 7, i32 7)
|
||
|
ret %struct.test* %v-new
|
||
|
}
|
||
|
|
||
|
; literal struct with nested literal struct
|
||
|
define {i64, i64, {i64} }* @test_literal_struct({i64, i64, {i64}}* %v) gc "statepoint-example" {
|
||
|
%tok = call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0, {i64, i64, {i64}} *%v)
|
||
|
%v-new = call {i64, i64, {i64}}* @llvm.experimental.gc.relocate.p0sl_i64i64sl_i64ss.test(token %tok, i32 7, i32 7)
|
||
|
ret {i64, i64, {i64}}* %v-new
|
||
|
}
|
||
|
; struct with a horrible name, broken when structs were unprefixed
|
||
|
%i32 = type { i32 }
|
||
|
|
||
|
define %i32* @test_i32_struct(%i32* %v) gc "statepoint-example" {
|
||
|
entry:
|
||
|
%tok = call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0, %i32* %v)
|
||
|
%v-new = call %i32* @llvm.experimental.gc.relocate.p0s_i32s(token %tok, i32 7, i32 7)
|
||
|
ret %i32* %v-new
|
||
|
}
|
||
|
; completely broken intrinsic naming due to needing remangling. Just use random naming to test
|
||
|
|
||
|
define %i32* @test_broken_names(%i32* %v) gc "statepoint-example" {
|
||
|
entry:
|
||
|
%tok = call fastcc token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.deadbeef(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0, %i32* %v)
|
||
|
; Make sure we do not destroy the calling convention when remangling
|
||
|
; CHECK: fastcc
|
||
|
%v-new = call %i32* @llvm.experimental.gc.relocate.beefdead(token %tok, i32 7, i32 7)
|
||
|
ret %i32* %v-new
|
||
|
}
|
||
|
declare zeroext i1 @return_i1()
|
||
|
declare token @llvm.experimental.gc.statepoint.p0f_i1f(i64, i32, i1 ()*, i32, i32, ...)
|
||
|
declare i32* @llvm.experimental.gc.relocate.p0i32(token, i32, i32)
|
||
|
declare float* @llvm.experimental.gc.relocate.p0f32(token, i32, i32)
|
||
|
declare [3 x i32]* @llvm.experimental.gc.relocate.p0a3i32(token, i32, i32)
|
||
|
declare <3 x i32>* @llvm.experimental.gc.relocate.p0v3i32(token, i32, i32)
|
||
|
declare %struct.test* @llvm.experimental.gc.relocate.p0s_struct.tests(token, i32, i32)
|
||
|
declare {i64, i64, {i64}}* @llvm.experimental.gc.relocate.p0sl_i64i64sl_i64ss.test(token, i32, i32)
|
||
|
declare %i32* @llvm.experimental.gc.relocate.p0s_i32s(token, i32, i32)
|
||
|
declare %i32* @llvm.experimental.gc.relocate.beefdead(token, i32, i32)
|
||
|
declare token @llvm.experimental.gc.statepoint.deadbeef(i64, i32, i1 ()*, i32, i32, ...)
|