summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/2008-09-25-sseregparm-1.ll
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-09-25 20:47:45 +0000
committerDale Johannesen <dalej@apple.com>2008-09-25 20:47:45 +0000
commitc9c6da61ac027d9818652d417907f84398288b99 (patch)
tree47df050f4b38ba844ed9163b55ac45fbf4b71a67 /test/CodeGen/X86/2008-09-25-sseregparm-1.ll
parent0c8927efed7576d8992c3950601fc19394603a75 (diff)
downloadllvm-c9c6da61ac027d9818652d417907f84398288b99.tar.gz
llvm-c9c6da61ac027d9818652d417907f84398288b99.tar.bz2
llvm-c9c6da61ac027d9818652d417907f84398288b99.tar.xz
Accept 'inreg' attribute on x86 functions as
meaning sse_regparm (i.e. float/double values go in XMM0 instead of ST0). Update documentation to reflect reality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56619 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2008-09-25-sseregparm-1.ll')
-rw-r--r--test/CodeGen/X86/2008-09-25-sseregparm-1.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2008-09-25-sseregparm-1.ll b/test/CodeGen/X86/2008-09-25-sseregparm-1.ll
new file mode 100644
index 0000000000..d103f144e2
--- /dev/null
+++ b/test/CodeGen/X86/2008-09-25-sseregparm-1.ll
@@ -0,0 +1,19 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movs | count 2
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep fld | count 2
+; check 'inreg' attribute for sse_regparm
+
+define double @foo1() inreg nounwind {
+ ret double 1.0
+}
+
+define float @foo2() inreg nounwind {
+ ret float 1.0
+}
+
+define double @bar() nounwind {
+ ret double 1.0
+}
+
+define float @bar2() nounwind {
+ ret float 1.0
+}