aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/SystemZ
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-10-01 13:10:16 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-10-01 13:10:16 +0000
commit47086570973e82fe5ea8ace9637ae73c2469e1da (patch)
tree53ca5b89f45584cd94882d0060ec66e735faa2e4 /test/CodeGen/SystemZ
parent4c8feae136bbb54ba09d8f8dc7e61714270f7cd5 (diff)
downloadexternal_llvm-47086570973e82fe5ea8ace9637ae73c2469e1da.zip
external_llvm-47086570973e82fe5ea8ace9637ae73c2469e1da.tar.gz
external_llvm-47086570973e82fe5ea8ace9637ae73c2469e1da.tar.bz2
[SystemZ] Allow selects with a high-word destination
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SystemZ')
-rw-r--r--test/CodeGen/SystemZ/asm-18.ll28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CodeGen/SystemZ/asm-18.ll b/test/CodeGen/SystemZ/asm-18.ll
index e7e171e..6126b50 100644
--- a/test/CodeGen/SystemZ/asm-18.ll
+++ b/test/CodeGen/SystemZ/asm-18.ll
@@ -287,3 +287,31 @@ define void @f12() {
i32 1000000000, i32 400000)
ret void
}
+
+; Test selects involving high registers.
+define void @f13(i32 %x, i32 %y) {
+; CHECK-LABEL: f13:
+; CHECK: llihl [[REG:%r[0-5]]], 0
+; CHECK: cije %r2, 0
+; CHECK: iihf [[REG]], 2102030405
+; CHECK: blah [[REG]]
+; CHECK: br %r14
+ %cmp = icmp eq i32 %x, 0
+ %val = select i1 %cmp, i32 0, i32 2102030405
+ call void asm sideeffect "blah $0", "h"(i32 %val)
+ ret void
+}
+
+; Test selects involving low registers.
+define void @f14(i32 %x, i32 %y) {
+; CHECK-LABEL: f14:
+; CHECK: lhi [[REG:%r[0-5]]], 0
+; CHECK: cije %r2, 0
+; CHECK: iilf [[REG]], 2102030405
+; CHECK: blah [[REG]]
+; CHECK: br %r14
+ %cmp = icmp eq i32 %x, 0
+ %val = select i1 %cmp, i32 0, i32 2102030405
+ call void asm sideeffect "blah $0", "r"(i32 %val)
+ ret void
+}