diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2016-11-11 12:46:28 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2016-11-11 12:46:28 +0000 |
commit | 92c2c672e5be7d4f15f4d40bb46fe7b6f403a311 (patch) | |
tree | 6d3ad07199a5aa275bd76fcecbd3cce98e807136 /llvm/test/MC/SystemZ | |
parent | 5dc7b67c6263fe7f2ced7cb4957e967ab770fab8 (diff) | |
download | bcm5719-llvm-92c2c672e5be7d4f15f4d40bb46fe7b6f403a311.tar.gz bcm5719-llvm-92c2c672e5be7d4f15f4d40bb46fe7b6f403a311.zip |
[SystemZ] Support load-and-zero-rightmost-byte facility
This adds support for the LZRF/LZRG/LLZRGF instructions that were
added on z13, and uses them for code generation were appropriate.
SystemZDAGToDAGISel::tryRISBGZero is updated again to prefer LLZRGF
over RISBG where both would be possible.
llvm-svn: 286586
Diffstat (limited to 'llvm/test/MC/SystemZ')
-rw-r--r-- | llvm/test/MC/SystemZ/insn-bad-z13.s | 24 | ||||
-rw-r--r-- | llvm/test/MC/SystemZ/insn-good-z13.s | 66 |
2 files changed, 90 insertions, 0 deletions
diff --git a/llvm/test/MC/SystemZ/insn-bad-z13.s b/llvm/test/MC/SystemZ/insn-bad-z13.s index 30681fe6b46..87f1ce8d2ab 100644 --- a/llvm/test/MC/SystemZ/insn-bad-z13.s +++ b/llvm/test/MC/SystemZ/insn-bad-z13.s @@ -5,6 +5,30 @@ # RUN: FileCheck < %t %s #CHECK: error: invalid operand +#CHECK: lzrf %r0, -524289 +#CHECK: error: invalid operand +#CHECK: lzrf %r0, 524288 + + lzrf %r0, -524289 + lzrf %r0, 524288 + +#CHECK: error: invalid operand +#CHECK: lzrg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: lzrg %r0, 524288 + + lzrg %r0, -524289 + lzrg %r0, 524288 + +#CHECK: error: invalid operand +#CHECK: llzrgf %r0, -524289 +#CHECK: error: invalid operand +#CHECK: llzrgf %r0, 524288 + + llzrgf %r0, -524289 + llzrgf %r0, 524288 + +#CHECK: error: invalid operand #CHECK: lcbb %r0, 0, -1 #CHECK: error: invalid operand #CHECK: lcbb %r0, 0, 16 diff --git a/llvm/test/MC/SystemZ/insn-good-z13.s b/llvm/test/MC/SystemZ/insn-good-z13.s index 66fcdba9a2a..73f3075975a 100644 --- a/llvm/test/MC/SystemZ/insn-good-z13.s +++ b/llvm/test/MC/SystemZ/insn-good-z13.s @@ -4,6 +4,72 @@ # RUN: llvm-mc -triple s390x-linux-gnu -mcpu=arch11 -show-encoding %s \ # RUN: | FileCheck %s +#CHECK: lzrf %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x3b] +#CHECK: lzrf %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x3b] +#CHECK: lzrf %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x3b] +#CHECK: lzrf %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x3b] +#CHECK: lzrf %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x3b] +#CHECK: lzrf %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x3b] +#CHECK: lzrf %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x3b] +#CHECK: lzrf %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x3b] +#CHECK: lzrf %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x3b] +#CHECK: lzrf %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x3b] + + lzrf %r0, -524288 + lzrf %r0, -1 + lzrf %r0, 0 + lzrf %r0, 1 + lzrf %r0, 524287 + lzrf %r0, 0(%r1) + lzrf %r0, 0(%r15) + lzrf %r0, 524287(%r1,%r15) + lzrf %r0, 524287(%r15,%r1) + lzrf %r15, 0 + +#CHECK: lzrg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x2a] +#CHECK: lzrg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x2a] +#CHECK: lzrg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x2a] +#CHECK: lzrg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x2a] +#CHECK: lzrg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x2a] +#CHECK: lzrg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x2a] +#CHECK: lzrg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x2a] +#CHECK: lzrg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x2a] +#CHECK: lzrg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x2a] +#CHECK: lzrg %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x2a] + + lzrg %r0, -524288 + lzrg %r0, -1 + lzrg %r0, 0 + lzrg %r0, 1 + lzrg %r0, 524287 + lzrg %r0, 0(%r1) + lzrg %r0, 0(%r15) + lzrg %r0, 524287(%r1,%r15) + lzrg %r0, 524287(%r15,%r1) + lzrg %r15, 0 + +#CHECK: llzrgf %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x3a] +#CHECK: llzrgf %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x3a] +#CHECK: llzrgf %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x3a] +#CHECK: llzrgf %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x3a] +#CHECK: llzrgf %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x3a] +#CHECK: llzrgf %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x3a] +#CHECK: llzrgf %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x3a] +#CHECK: llzrgf %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x3a] +#CHECK: llzrgf %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x3a] +#CHECK: llzrgf %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x3a] + + llzrgf %r0, -524288 + llzrgf %r0, -1 + llzrgf %r0, 0 + llzrgf %r0, 1 + llzrgf %r0, 524287 + llzrgf %r0, 0(%r1) + llzrgf %r0, 0(%r15) + llzrgf %r0, 524287(%r1,%r15) + llzrgf %r0, 524287(%r15,%r1) + llzrgf %r15, 0 + #CHECK: lcbb %r0, 0, 0 # encoding: [0xe7,0x00,0x00,0x00,0x00,0x27] #CHECK: lcbb %r0, 0, 15 # encoding: [0xe7,0x00,0x00,0x00,0xf0,0x27] #CHECK: lcbb %r0, 4095, 0 # encoding: [0xe7,0x00,0x0f,0xff,0x00,0x27] |