From cc0209e555fb939321b236837c42c2b09e3fc2f9 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Thu, 8 Feb 2007 06:45:02 +0000 Subject: [PATCH] For PR1187: Add some interesting CSRETCC upgrade cases. llvm-svn: 34041 --- test/Assembler/2007-02-07-UpgradeCSRETCC.ll | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/Assembler/2007-02-07-UpgradeCSRETCC.ll diff --git a/test/Assembler/2007-02-07-UpgradeCSRETCC.ll b/test/Assembler/2007-02-07-UpgradeCSRETCC.ll new file mode 100644 index 00000000000..85ad246c0af --- /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 +}