aboutsummaryrefslogtreecommitdiffstats
path: root/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
commitb1938263c7d0fcf8362717625a1a5c460cbf9528 (patch)
treef72372f5829de88762ec756b7ff38b2720990cba /test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll
parente4569943d936d73dec6f36f545e9902095bd3fd8 (diff)
downloadexternal_llvm-b1938263c7d0fcf8362717625a1a5c460cbf9528.zip
external_llvm-b1938263c7d0fcf8362717625a1a5c460cbf9528.tar.gz
external_llvm-b1938263c7d0fcf8362717625a1a5c460cbf9528.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll')
-rw-r--r--test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll b/test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll
new file mode 100644
index 0000000..c9e30d8
--- /dev/null
+++ b/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>)