aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/CBackend
diff options
context:
space:
mode:
authorJohn Criswell <criswell@uiuc.edu>2004-02-26 22:55:11 +0000
committerJohn Criswell <criswell@uiuc.edu>2004-02-26 22:55:11 +0000
commit726f0b8d36df8079f5c018928f93068792d08135 (patch)
tree5b90b9079424d90754f9cef573f7ce9a92e6f4a7 /test/CodeGen/CBackend
parent3799eec3cfbcff0bbd7bcf2539dba52aa9af58e4 (diff)
downloadexternal_llvm-726f0b8d36df8079f5c018928f93068792d08135.zip
external_llvm-726f0b8d36df8079f5c018928f93068792d08135.tar.gz
external_llvm-726f0b8d36df8079f5c018928f93068792d08135.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11885 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/CBackend')
-rw-r--r--test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.llx8
-rw-r--r--test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx8
2 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.llx b/test/CodeGen/CBackend/2004-02-26-FPNotPrintableConstants.llx
new file mode 100644
index 0000000..bd43d0d
--- /dev/null
+++ b/test/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/test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx b/test/CodeGen/CBackend/2004-02-26-LinkOnceFunctions.llx
new file mode 100644
index 0000000..918252d
--- /dev/null
+++ b/test/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
+}
+