From 6fd2e36fd565a413ab9f200d3a853a9005aef369 Mon Sep 17 00:00:00 2001 From: John Criswell Date: Thu, 26 Feb 2004 22:55:11 +0000 Subject: [PATCH] Regression tests for PR258 and PR259. 2004-02-26-FPNotPrintableConstants.llx ensures that constants used in an LLVM program are declared static if they are assigned to global variables. 2004-02-26-LinkOnceFunctions.llx ensures that linkonce functions get the weak attribute. llvm-svn: 11885 --- .../CBackend/2004-02-26-FPNotPrintableConstants.llx | 8 ++++++++ .../CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 llvm/test/Regression/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.llx create mode 100644 llvm/test/Regression/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx diff --git a/llvm/test/Regression/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.llx b/llvm/test/Regression/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.llx new file mode 100644 index 000000000000..bd43d0d1f6be --- /dev/null +++ b/llvm/test/Regression/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.llx @@ -0,0 +1,8 @@ +; This is a non-normal FP value: it's a nan. +; RUN: llvm-as < %s | llc -march=c +; llvm-as < %s | llc -march=c | grep FPConstant | grep static + +float %func () { + ret float 0xFF20000000000000 +} + diff --git a/llvm/test/Regression/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx b/llvm/test/Regression/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx new file mode 100644 index 000000000000..918252d73679 --- /dev/null +++ b/llvm/test/Regression/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | llc -march=c | grep func1 | grep WEAK + +implementation + +linkonce int %func1 () { + ret int 5 +} +