summaryrefslogtreecommitdiffstats
path: root/test/Assembler
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-08 06:45:02 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-08 06:45:02 +0000
commitc61a8a0a268f92570ec6547517bca3f51e87664e (patch)
treef7f655af42afcba5c995eeba2545f0fa35eed974 /test/Assembler
parent2f5bcb5f38e051ffa41b6257d9c0a0e94067dee4 (diff)
downloadexternal_llvm-c61a8a0a268f92570ec6547517bca3f51e87664e.zip
external_llvm-c61a8a0a268f92570ec6547517bca3f51e87664e.tar.gz
external_llvm-c61a8a0a268f92570ec6547517bca3f51e87664e.tar.bz2
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
Diffstat (limited to 'test/Assembler')
-rw-r--r--test/Assembler/2007-02-07-UpgradeCSRETCC.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Assembler/2007-02-07-UpgradeCSRETCC.ll b/test/Assembler/2007-02-07-UpgradeCSRETCC.ll
new file mode 100644
index 0000000..85ad246
--- /dev/null
+++ b/test/Assembler/2007-02-07-UpgradeCSRETCC.ll
@@ -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
+}