summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Mips/ul1.ll
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-09-15 01:02:03 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-09-15 01:02:03 +0000
commitf934d159ae6b57f05d8163265b9deaa29315d2e7 (patch)
treee1d616f1ceeec93d8a6686345c09dce666e87aa7 /test/CodeGen/Mips/ul1.ll
parent062986c2f0a020c0652010e3c8549653397048f4 (diff)
downloadexternal_llvm-f934d159ae6b57f05d8163265b9deaa29315d2e7.zip
external_llvm-f934d159ae6b57f05d8163265b9deaa29315d2e7.tar.gz
external_llvm-f934d159ae6b57f05d8163265b9deaa29315d2e7.tar.bz2
Handled unaligned load/stores properly in Mips16
Patch by Reed Kotler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163956 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips/ul1.ll')
-rw-r--r--test/CodeGen/Mips/ul1.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/ul1.ll b/test/CodeGen/Mips/ul1.ll
new file mode 100644
index 0000000..7e64ff4
--- /dev/null
+++ b/test/CodeGen/Mips/ul1.ll
@@ -0,0 +1,15 @@
+; RUN: llc -march=mipsel -mcpu=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=16
+%struct.ua = type <{ i16, i32 }>
+
+@foo = common global %struct.ua zeroinitializer, align 1
+
+define i32 @main() nounwind {
+entry:
+ store i32 10, i32* getelementptr inbounds (%struct.ua* @foo, i32 0, i32 1), align 1
+; 16: sb ${{[0-9]+}}, {{[0-9]+}}(${{[0-9]+}})
+; 16: sb ${{[0-9]+}}, {{[0-9]+}}(${{[0-9]+}})
+; 16: sb ${{[0-9]+}}, {{[0-9]+}}(${{[0-9]+}})
+; 16: sb ${{[0-9]+}}, {{[0-9]+}}(${{[0-9]+}})
+ ret i32 0
+}
+