Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64][SVE] Asm: Add support for unpredicated LSL/LSR (shift by im…
…mediate) instructions. Reviewers: rengolin, fhahn, javed.absar, SjoerdMeijer, huntergr, t.p.northover, echristo, evandro Reviewed By: rengolin, fhahn Subscribers: tschuett, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D45371 llvm-svn: 329681
- Loading branch information
1 parent
c9f409e
commit f974e25
Showing
6 changed files
with
247 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s | ||
|
||
lsl z18.b, z28.b, #-1 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7] | ||
// CHECK-NEXT: lsl z18.b, z28.b, #-1 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
lsl z1.b, z9.b, #8 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7] | ||
// CHECK-NEXT: lsl z1.b, z9.b, #8 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
lsl z21.h, z2.h, #-1 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15] | ||
// CHECK-NEXT: lsl z21.h, z2.h, #-1 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
lsl z14.h, z30.h, #16 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15] | ||
// CHECK-NEXT: lsl z14.h, z30.h, #16 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
lsl z6.s, z12.s, #-1 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31] | ||
// CHECK-NEXT: lsl z6.s, z12.s, #-1 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
lsl z23.s, z19.s, #32 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31] | ||
// CHECK-NEXT: lsl z23.s, z19.s, #32 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
lsl z3.d, z24.d, #-1 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 63] | ||
// CHECK-NEXT: lsl z3.d, z24.d, #-1 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
lsl z25.d, z16.d, #64 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 63] | ||
// CHECK-NEXT: lsl z25.d, z16.d, #64 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ | ||
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR | ||
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ | ||
// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST | ||
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ | ||
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN | ||
|
||
lsl z0.b, z0.b, #0 | ||
// CHECK-INST: lsl z0.b, z0.b, #0 | ||
// CHECK-ENCODING: [0x00,0x9c,0x28,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: 00 9c 28 04 <unknown> | ||
|
||
lsl z31.b, z31.b, #7 | ||
// CHECK-INST: lsl z31.b, z31.b, #7 | ||
// CHECK-ENCODING: [0xff,0x9f,0x2f,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: ff 9f 2f 04 <unknown> | ||
|
||
lsl z0.h, z0.h, #0 | ||
// CHECK-INST: lsl z0.h, z0.h, #0 | ||
// CHECK-ENCODING: [0x00,0x9c,0x30,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: 00 9c 30 04 <unknown> | ||
|
||
lsl z31.h, z31.h, #15 | ||
// CHECK-INST: lsl z31.h, z31.h, #15 | ||
// CHECK-ENCODING: [0xff,0x9f,0x3f,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: ff 9f 3f 04 <unknown> | ||
|
||
lsl z0.s, z0.s, #0 | ||
// CHECK-INST: lsl z0.s, z0.s, #0 | ||
// CHECK-ENCODING: [0x00,0x9c,0x60,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: 00 9c 60 04 <unknown> | ||
|
||
lsl z31.s, z31.s, #31 | ||
// CHECK-INST: lsl z31.s, z31.s, #31 | ||
// CHECK-ENCODING: [0xff,0x9f,0x7f,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: ff 9f 7f 04 <unknown> | ||
|
||
lsl z0.d, z0.d, #0 | ||
// CHECK-INST: lsl z0.d, z0.d, #0 | ||
// CHECK-ENCODING: [0x00,0x9c,0xa0,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: 00 9c a0 04 <unknown> | ||
|
||
lsl z31.d, z31.d, #63 | ||
// CHECK-INST: lsl z31.d, z31.d, #63 | ||
// CHECK-ENCODING: [0xff,0x9f,0xff,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: ff 9f ff 04 <unknown> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s | ||
|
||
lsr z30.b, z10.b, #0 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8] | ||
// CHECK-NEXT: lsr z30.b, z10.b, #0 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
lsr z18.b, z27.b, #9 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8] | ||
// CHECK-NEXT: lsr z18.b, z27.b, #9 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
lsr z26.h, z4.h, #0 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16] | ||
// CHECK-NEXT: lsr z26.h, z4.h, #0 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
lsr z25.h, z10.h, #17 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16] | ||
// CHECK-NEXT: lsr z25.h, z10.h, #17 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
lsr z17.s, z0.s, #0 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32] | ||
// CHECK-NEXT: lsr z17.s, z0.s, #0 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
lsr z0.s, z15.s, #33 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32] | ||
// CHECK-NEXT: lsr z0.s, z15.s, #33 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
lsr z4.d, z13.d, #0 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 64] | ||
// CHECK-NEXT: lsr z4.d, z13.d, #0 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
||
lsr z26.d, z26.d, #65 | ||
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 64] | ||
// CHECK-NEXT: lsr z26.d, z26.d, #65 | ||
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ | ||
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR | ||
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ | ||
// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST | ||
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ | ||
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN | ||
|
||
lsr z0.b, z0.b, #8 | ||
// CHECK-INST: lsr z0.b, z0.b, #8 | ||
// CHECK-ENCODING: [0x00,0x94,0x28,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: 00 94 28 04 <unknown> | ||
|
||
lsr z31.b, z31.b, #1 | ||
// CHECK-INST: lsr z31.b, z31.b, #1 | ||
// CHECK-ENCODING: [0xff,0x97,0x2f,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: ff 97 2f 04 <unknown> | ||
|
||
lsr z0.h, z0.h, #16 | ||
// CHECK-INST: lsr z0.h, z0.h, #16 | ||
// CHECK-ENCODING: [0x00,0x94,0x30,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: 00 94 30 04 <unknown> | ||
|
||
lsr z31.h, z31.h, #1 | ||
// CHECK-INST: lsr z31.h, z31.h, #1 | ||
// CHECK-ENCODING: [0xff,0x97,0x3f,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: ff 97 3f 04 <unknown> | ||
|
||
lsr z0.s, z0.s, #32 | ||
// CHECK-INST: lsr z0.s, z0.s, #32 | ||
// CHECK-ENCODING: [0x00,0x94,0x60,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: 00 94 60 04 <unknown> | ||
|
||
lsr z31.s, z31.s, #1 | ||
// CHECK-INST: lsr z31.s, z31.s, #1 | ||
// CHECK-ENCODING: [0xff,0x97,0x7f,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: ff 97 7f 04 <unknown> | ||
|
||
lsr z0.d, z0.d, #64 | ||
// CHECK-INST: lsr z0.d, z0.d, #64 | ||
// CHECK-ENCODING: [0x00,0x94,0xa0,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: 00 94 a0 04 <unknown> | ||
|
||
lsr z31.d, z31.d, #1 | ||
// CHECK-INST: lsr z31.d, z31.d, #1 | ||
// CHECK-ENCODING: [0xff,0x97,0xff,0x04] | ||
// CHECK-ERROR: instruction requires: sve | ||
// CHECK-UNKNOWN: ff 97 ff 04 <unknown> |