mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-16 14:31:59 +00:00
For PR1187:
Add some interesting CSRETCC upgrade cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34041 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2f5bcb5f38
commit
c61a8a0a26
21
test/Assembler/2007-02-07-UpgradeCSRETCC.ll
Normal file
21
test/Assembler/2007-02-07-UpgradeCSRETCC.ll
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
; For PR1187
|
||||||
|
; RUN: llvm-upgrade < %s > /dev/null
|
||||||
|
|
||||||
|
%mystruct = type { int, double }
|
||||||
|
%glob = global %mystruct { int 3, double 42.0 }
|
||||||
|
%fptr = external global void (i32)*
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
csretcc void %nada(%mystruct * %ptr, int %val) {
|
||||||
|
ret void
|
||||||
|
}
|
||||||
|
|
||||||
|
int %main(int %argc, ubyte** %argv) {
|
||||||
|
%astr = alloca %mystruct
|
||||||
|
call void %nada(%mystruct* %astr, i32 7)
|
||||||
|
%fptr = alloca void (%mystruct*, i32)*
|
||||||
|
%f = load void (%mystruct*, i32)**%fptr
|
||||||
|
call csretcc void %f(%mystruct* %astr, i32 7)
|
||||||
|
ret int 0
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user