diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-07-11 08:59:12 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-07-11 08:59:12 +0000 |
commit | b3cabb44c32b5a3aba9b4d23aae9723d498ea7a9 (patch) | |
tree | 67565add4984989a53566cb7836cfadc52f2e39e /test/CodeGen/SystemZ/atomicrmw-or-02.ll | |
parent | 3ee0673e4f5f0324ecd0a65507009b0748ed072c (diff) | |
download | external_llvm-b3cabb44c32b5a3aba9b4d23aae9723d498ea7a9.zip external_llvm-b3cabb44c32b5a3aba9b4d23aae9723d498ea7a9.tar.gz external_llvm-b3cabb44c32b5a3aba9b4d23aae9723d498ea7a9.tar.bz2 |
[SystemZ] Use zeroing form of RISBG for some AND sequences
RISBG can handle some ANDs for which no AND IMMEDIATE exists.
It also acts as a three-operand AND for some cases where an
AND IMMEDIATE could be used instead.
It might be worth adding a pass to replace RISBG with AND IMMEDIATE
in cases where the register operands end up being the same and where
AND IMMEDIATE is smaller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186072 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SystemZ/atomicrmw-or-02.ll')
-rw-r--r-- | test/CodeGen/SystemZ/atomicrmw-or-02.ll | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/CodeGen/SystemZ/atomicrmw-or-02.ll b/test/CodeGen/SystemZ/atomicrmw-or-02.ll index 5c3f286..3b8efcb 100644 --- a/test/CodeGen/SystemZ/atomicrmw-or-02.ll +++ b/test/CodeGen/SystemZ/atomicrmw-or-02.ll @@ -14,14 +14,14 @@ ; instructions. define i16 @f1(i16 *%src, i16 %b) { ; CHECK: f1: -; CHECK: sllg [[SHIFT:%r[1-9]+]], %r2, 3 -; CHECK: nill %r2, 65532 -; CHECK: l [[OLD:%r[0-9]+]], 0(%r2) +; CHECK-DAG: sllg [[SHIFT:%r[1-9]+]], %r2, 3 +; CHECK-DAG: risbg [[BASE:%r[1-9]+]], %r2, 0, 189, 0 +; CHECK: l [[OLD:%r[0-9]+]], 0([[BASE]]) ; CHECK: [[LABEL:\.[^:]*]]: ; CHECK: rll [[ROT:%r[0-9]+]], [[OLD]], 0([[SHIFT]]) ; CHECK: or [[ROT]], %r3 ; CHECK: rll [[NEW:%r[0-9]+]], [[ROT]], 0({{%r[1-9]+}}) -; CHECK: cs [[OLD]], [[NEW]], 0(%r2) +; CHECK: cs [[OLD]], [[NEW]], 0([[BASE]]) ; CHECK: jlh [[LABEL]] ; CHECK: rll %r2, [[OLD]], 16([[SHIFT]]) ; CHECK: br %r14 @@ -48,14 +48,14 @@ define i16 @f1(i16 *%src, i16 %b) { ; Check the minimum signed value. We OR the rotated word with 0x80000000. define i16 @f2(i16 *%src) { ; CHECK: f2: -; CHECK: sllg [[SHIFT:%r[1-9]+]], %r2, 3 -; CHECK: nill %r2, 65532 -; CHECK: l [[OLD:%r[0-9]+]], 0(%r2) +; CHECK-DAG: sllg [[SHIFT:%r[1-9]+]], %r2, 3 +; CHECK-DAG: risbg [[BASE:%r[1-9]+]], %r2, 0, 189, 0 +; CHECK: l [[OLD:%r[0-9]+]], 0([[BASE]]) ; CHECK: [[LABEL:\.[^:]*]]: ; CHECK: rll [[ROT:%r[0-9]+]], [[OLD]], 0([[SHIFT]]) ; CHECK: oilh [[ROT]], 32768 ; CHECK: rll [[NEW:%r[0-9]+]], [[ROT]], 0([[NEGSHIFT:%r[1-9]+]]) -; CHECK: cs [[OLD]], [[NEW]], 0(%r2) +; CHECK: cs [[OLD]], [[NEW]], 0([[BASE]]) ; CHECK: jlh [[LABEL]] ; CHECK: rll %r2, [[OLD]], 16([[SHIFT]]) ; CHECK: br %r14 |