aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/SystemZ/05-MemImmStores.ll
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 14:10:17 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 14:10:17 +0000
commit1ed1e3ecd489e469a5d9a3727139cecb8615bb9c (patch)
tree20d9cddfb8a465fdfdb97ecbf75fd980ca20bdf4 /test/CodeGen/SystemZ/05-MemImmStores.ll
parent5a11e02fbd7f0df98338c75cd468c42d29ef16e4 (diff)
downloadexternal_llvm-1ed1e3ecd489e469a5d9a3727139cecb8615bb9c.zip
external_llvm-1ed1e3ecd489e469a5d9a3727139cecb8615bb9c.tar.gz
external_llvm-1ed1e3ecd489e469a5d9a3727139cecb8615bb9c.tar.bz2
Consolidate reg-imm / reg-reg-imm address mode selection logic in one place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SystemZ/05-MemImmStores.ll')
-rw-r--r--test/CodeGen/SystemZ/05-MemImmStores.ll17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/CodeGen/SystemZ/05-MemImmStores.ll b/test/CodeGen/SystemZ/05-MemImmStores.ll
index b582144..1a1d2f0 100644
--- a/test/CodeGen/SystemZ/05-MemImmStores.ll
+++ b/test/CodeGen/SystemZ/05-MemImmStores.ll
@@ -1,7 +1,8 @@
; RUN: llvm-as < %s | llc -mattr=+z10 | grep mvghi | count 1
; RUN: llvm-as < %s | llc -mattr=+z10 | grep mvhi | count 1
; RUN: llvm-as < %s | llc -mattr=+z10 | grep mvhhi | count 1
-; RUN: llvm-as < %s | llc | grep mvi | count 1
+; RUN: llvm-as < %s | llc | grep mvi | count 2
+; RUN: llvm-as < %s | llc | grep mviy | count 1
target datalayout = "E-p:64:64:64-i1:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128"
target triple = "s390x-unknown-linux-gnu"
@@ -33,3 +34,17 @@ entry:
store i8 4, i8* %add.ptr
ret void
}
+
+define void @foo5(i8* nocapture %a, i64 %idx) nounwind {
+entry:
+ %add.ptr = getelementptr i8* %a, i64 -1 ; <i8*> [#uses=1]
+ store i8 4, i8* %add.ptr
+ ret void
+}
+
+define void @foo6(i16* nocapture %a, i64 %idx) nounwind {
+entry:
+ %add.ptr = getelementptr i16* %a, i64 -1 ; <i16*> [#uses=1]
+ store i16 3, i16* %add.ptr
+ ret void
+}