aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/ARM
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-10-13 06:56:18 +0000
committerChris Lattner <sabre@nondot.org>2007-10-13 06:56:18 +0000
commitf8f7cf398768dc6be39cb6ca2ec7f8c125c8882f (patch)
treeb9453dfcd7f9b6326e17addc2fe0b4406a1e0272 /test/CodeGen/ARM
parent2b4c279a8e203fa8b13adf7ba3a5d4c8bef70df3 (diff)
downloadexternal_llvm-f8f7cf398768dc6be39cb6ca2ec7f8c125c8882f.zip
external_llvm-f8f7cf398768dc6be39cb6ca2ec7f8c125c8882f.tar.gz
external_llvm-f8f7cf398768dc6be39cb6ca2ec7f8c125c8882f.tar.bz2
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM')
-rw-r--r--test/CodeGen/ARM/truncstore-dag-combine.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/truncstore-dag-combine.ll b/test/CodeGen/ARM/truncstore-dag-combine.ll
new file mode 100644
index 0000000..0e85fb6
--- /dev/null
+++ b/test/CodeGen/ARM/truncstore-dag-combine.ll
@@ -0,0 +1,18 @@
+; RUN: llvm-as < %s | llc -march=arm | not grep orr
+; RUN: llvm-as < %s | llc -march=arm | not grep mov
+
+define void @bar(i8* %P, i16* %Q) {
+entry:
+ %P1 = bitcast i8* %P to i16* ; <i16*> [#uses=1]
+ %tmp = load i16* %Q, align 1 ; <i16> [#uses=1]
+ store i16 %tmp, i16* %P1, align 1
+ ret void
+}
+
+define void @foo(i8* %P, i32* %Q) {
+entry:
+ %P1 = bitcast i8* %P to i32* ; <i32*> [#uses=1]
+ %tmp = load i32* %Q, align 1 ; <i32> [#uses=1]
+ store i32 %tmp, i32* %P1, align 1
+ ret void
+}