summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-05-23 00:37:07 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-05-23 00:37:07 +0000
commitf3be7a7ea79e1042362f4dba4869cf4a4c8c3fc9 (patch)
treee1b9e2aa1d98958c679bc8332b48c4444ae00b60 /llvm/test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll
parent0752bffe9aa0051518316d410e7373b7f896bc2d (diff)
downloadbcm5719-llvm-f3be7a7ea79e1042362f4dba4869cf4a4c8c3fc9.tar.gz
bcm5719-llvm-f3be7a7ea79e1042362f4dba4869cf4a4c8c3fc9.zip
Bug: rcpps can only folds a load if the address is 16-byte aligned. Fixed many 'ps' load folding patterns in X86InstrSSE.td which are missing the proper alignment checks.
Also fixed some 80 col. violations. llvm-svn: 51462
Diffstat (limited to 'llvm/test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll')
-rw-r--r--llvm/test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll b/llvm/test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll
new file mode 100644
index 00000000000..c9e30d8f80a
--- /dev/null
+++ b/llvm/test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll
@@ -0,0 +1,11 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movups | count 2
+
+define void @a(<4 x float>* %x) nounwind {
+entry:
+ %tmp2 = load <4 x float>* %x, align 1
+ %inv = call <4 x float> @llvm.x86.sse.rcp.ps(<4 x float> %tmp2)
+ store <4 x float> %inv, <4 x float>* %x, align 1
+ ret void
+}
+
+declare <4 x float> @llvm.x86.sse.rcp.ps(<4 x float>)
OpenPOWER on IntegriCloud