diff options
| author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-07-19 16:24:22 +0000 |
|---|---|---|
| committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-07-19 16:24:22 +0000 |
| commit | c57e586792504cb7582dbfbc77d8ae746a02e285 (patch) | |
| tree | 3ffca119796c15408a23c81a5ba789e01215b4f6 /llvm/test/CodeGen | |
| parent | 4c2a09d6c4e0ed887e44a73afe49bb63a93a389a (diff) | |
| download | bcm5719-llvm-c57e586792504cb7582dbfbc77d8ae746a02e285.tar.gz bcm5719-llvm-c57e586792504cb7582dbfbc77d8ae746a02e285.zip | |
[SystemZ] Add NGRK, OGRK and XGRK
Like r186683, but for 64 bits.
llvm-svn: 186685
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/and-03.ll | 3 | ||||
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/and-07.ll | 18 | ||||
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/atomicrmw-and-04.ll | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/atomicrmw-nand-04.ll | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/atomicrmw-or-04.ll | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/atomicrmw-xor-04.ll | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/or-03.ll | 3 | ||||
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/or-07.ll | 18 | ||||
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/xor-03.ll | 3 | ||||
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/xor-07.ll | 18 |
10 files changed, 64 insertions, 7 deletions
diff --git a/llvm/test/CodeGen/SystemZ/and-03.ll b/llvm/test/CodeGen/SystemZ/and-03.ll index ca262cfb459..a0560d46e4e 100644 --- a/llvm/test/CodeGen/SystemZ/and-03.ll +++ b/llvm/test/CodeGen/SystemZ/and-03.ll @@ -1,6 +1,7 @@ ; Test 64-bit ANDs in which the second operand is variable. ; -; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s +; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | FileCheck %s +; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z196 | FileCheck %s declare i64 @foo() diff --git a/llvm/test/CodeGen/SystemZ/and-07.ll b/llvm/test/CodeGen/SystemZ/and-07.ll index 2bdf97d4704..ad4c4af59fd 100644 --- a/llvm/test/CodeGen/SystemZ/and-07.ll +++ b/llvm/test/CodeGen/SystemZ/and-07.ll @@ -19,3 +19,21 @@ define i32 @f2(i32 %a, i32 %b) { %and = and i32 %a, %b ret i32 %and } + +; Check NGRK. +define i64 @f3(i64 %a, i64 %b, i64 %c) { +; CHECK-LABEL: f3: +; CHECK: ngrk %r2, %r3, %r4 +; CHECK: br %r14 + %and = and i64 %b, %c + ret i64 %and +} + +; Check that we can still use NGR in obvious cases. +define i64 @f4(i64 %a, i64 %b) { +; CHECK-LABEL: f4: +; CHECK: ngr %r2, %r3 +; CHECK: br %r14 + %and = and i64 %a, %b + ret i64 %and +} diff --git a/llvm/test/CodeGen/SystemZ/atomicrmw-and-04.ll b/llvm/test/CodeGen/SystemZ/atomicrmw-and-04.ll index 6a9f81ac39b..b224423c0b3 100644 --- a/llvm/test/CodeGen/SystemZ/atomicrmw-and-04.ll +++ b/llvm/test/CodeGen/SystemZ/atomicrmw-and-04.ll @@ -1,6 +1,6 @@ ; Test 64-bit atomic ANDs. ; -; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s +; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | FileCheck %s ; Check ANDs of a variable. define i64 @f1(i64 %dummy, i64 *%src, i64 %b) { diff --git a/llvm/test/CodeGen/SystemZ/atomicrmw-nand-04.ll b/llvm/test/CodeGen/SystemZ/atomicrmw-nand-04.ll index 2fb919d3a34..907647106c8 100644 --- a/llvm/test/CodeGen/SystemZ/atomicrmw-nand-04.ll +++ b/llvm/test/CodeGen/SystemZ/atomicrmw-nand-04.ll @@ -1,6 +1,6 @@ ; Test 64-bit atomic NANDs. ; -; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s +; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | FileCheck %s ; Check NANDs of a variable. define i64 @f1(i64 %dummy, i64 *%src, i64 %b) { diff --git a/llvm/test/CodeGen/SystemZ/atomicrmw-or-04.ll b/llvm/test/CodeGen/SystemZ/atomicrmw-or-04.ll index de798be1c13..47827687659 100644 --- a/llvm/test/CodeGen/SystemZ/atomicrmw-or-04.ll +++ b/llvm/test/CodeGen/SystemZ/atomicrmw-or-04.ll @@ -1,6 +1,6 @@ ; Test 64-bit atomic ORs. ; -; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s +; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | FileCheck %s ; Check ORs of a variable. define i64 @f1(i64 %dummy, i64 *%src, i64 %b) { diff --git a/llvm/test/CodeGen/SystemZ/atomicrmw-xor-04.ll b/llvm/test/CodeGen/SystemZ/atomicrmw-xor-04.ll index d767b20a574..1e438bd2dc1 100644 --- a/llvm/test/CodeGen/SystemZ/atomicrmw-xor-04.ll +++ b/llvm/test/CodeGen/SystemZ/atomicrmw-xor-04.ll @@ -1,6 +1,6 @@ ; Test 64-bit atomic XORs. ; -; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s +; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | FileCheck %s ; Check XORs of a variable. define i64 @f1(i64 %dummy, i64 *%src, i64 %b) { diff --git a/llvm/test/CodeGen/SystemZ/or-03.ll b/llvm/test/CodeGen/SystemZ/or-03.ll index 3e373673686..5fdbdfd1ed1 100644 --- a/llvm/test/CodeGen/SystemZ/or-03.ll +++ b/llvm/test/CodeGen/SystemZ/or-03.ll @@ -1,6 +1,7 @@ ; Test 64-bit ORs in which the second operand is variable. ; -; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s +; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | FileCheck %s +; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z196 | FileCheck %s declare i64 @foo() diff --git a/llvm/test/CodeGen/SystemZ/or-07.ll b/llvm/test/CodeGen/SystemZ/or-07.ll index f6848a16591..9fff88e7165 100644 --- a/llvm/test/CodeGen/SystemZ/or-07.ll +++ b/llvm/test/CodeGen/SystemZ/or-07.ll @@ -19,3 +19,21 @@ define i32 @f2(i32 %a, i32 %b) { %or = or i32 %a, %b ret i32 %or } + +; Check OGRK. +define i64 @f3(i64 %a, i64 %b, i64 %c) { +; CHECK-LABEL: f3: +; CHECK: ogrk %r2, %r3, %r4 +; CHECK: br %r14 + %or = or i64 %b, %c + ret i64 %or +} + +; Check that we can still use OGR in obvious cases. +define i64 @f4(i64 %a, i64 %b) { +; CHECK-LABEL: f4: +; CHECK: ogr %r2, %r3 +; CHECK: br %r14 + %or = or i64 %a, %b + ret i64 %or +} diff --git a/llvm/test/CodeGen/SystemZ/xor-03.ll b/llvm/test/CodeGen/SystemZ/xor-03.ll index 2cd428ae7fc..ab7f2584b60 100644 --- a/llvm/test/CodeGen/SystemZ/xor-03.ll +++ b/llvm/test/CodeGen/SystemZ/xor-03.ll @@ -1,6 +1,7 @@ ; Test 64-bit XORs in which the second operand is variable. ; -; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s +; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | FileCheck %s +; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z196 | FileCheck %s declare i64 @foo() diff --git a/llvm/test/CodeGen/SystemZ/xor-07.ll b/llvm/test/CodeGen/SystemZ/xor-07.ll index 22deef64ce9..ec2a0385b16 100644 --- a/llvm/test/CodeGen/SystemZ/xor-07.ll +++ b/llvm/test/CodeGen/SystemZ/xor-07.ll @@ -19,3 +19,21 @@ define i32 @f2(i32 %a, i32 %b) { %xor = xor i32 %a, %b ret i32 %xor } + +; Check XGRK. +define i64 @f3(i64 %a, i64 %b, i64 %c) { +; CHECK-LABEL: f3: +; CHECK: xgrk %r2, %r3, %r4 +; CHECK: br %r14 + %xor = xor i64 %b, %c + ret i64 %xor +} + +; Check that we can still use XGR in obvious cases. +define i64 @f4(i64 %a, i64 %b) { +; CHECK-LABEL: f4: +; CHECK: xgr %r2, %r3 +; CHECK: br %r14 + %xor = xor i64 %a, %b + ret i64 %xor +} |

