summaryrefslogtreecommitdiff
path: root/test/CodeGen/CBackend
diff options
context:
space:
mode:
authorLauro Ramos Venancio <lauro.venancio@gmail.com>2008-02-01 21:25:59 +0000
committerLauro Ramos Venancio <lauro.venancio@gmail.com>2008-02-01 21:25:59 +0000
commit859efca7f9c412f251e2303fe1f0ae80728d2c91 (patch)
tree222e58b243494f9c7dcbd7fe1cfe3b9ec5ea8ce8 /test/CodeGen/CBackend
parent532d022794beabceae09c7fcc222a6e4e929c748 (diff)
downloadllvm-859efca7f9c412f251e2303fe1f0ae80728d2c91.tar.gz
llvm-859efca7f9c412f251e2303fe1f0ae80728d2c91.tar.bz2
llvm-859efca7f9c412f251e2303fe1f0ae80728d2c91.tar.xz
CBackend: Implement unaligned load/store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46646 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/CBackend')
-rw-r--r--test/CodeGen/CBackend/2008-02-01-UnalignedLoadStore.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/CBackend/2008-02-01-UnalignedLoadStore.ll b/test/CodeGen/CBackend/2008-02-01-UnalignedLoadStore.ll
new file mode 100644
index 0000000000..269126d759
--- /dev/null
+++ b/test/CodeGen/CBackend/2008-02-01-UnalignedLoadStore.ll
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | llc -march=c | \
+; RUN: grep {struct __attribute__ ((packed, aligned(} | count 4
+
+define void @test(i32* %P) {
+ %X = load i32* %P, align 1
+ store i32 %X, i32* %P, align 1
+ ret void
+}
+
+define void @test2(i32* %P) {
+ %X = volatile load i32* %P, align 2
+ volatile store i32 %X, i32* %P, align 2
+ ret void
+}
+